Files
Jason Rhinelander 06ff0c47cb Add user groups plus many small changes
- Add new user groups config for tracking communities and legacy closed
  groups (and new closed groups in the future).
- Updated group terminology to match new Session terms: API bits named
  along the lines of "legacy closed group" are now "legacy group", and
  "open group" is now "community".
- Added new fields to contacts:
    - `hidden` (true = conversation hidden)
    - `priority` (higher = pinned higher; 0 = unpinned)
    - `exp_mode` expiration mode (named enum, defaulting to
      expiration_mode::none)
    - `exp_timer` the expiration timer, in minutes
- user groups similarly get `priority` for both communities/legacy
  groups, and legacy groups also get `hidden` and `disappearing_timer`.
- Abstracted the general "community" related settings (like base url,
  room, pubkey) into a new `community` class as it is shared between
  convo volatile and the new user groups configs.  (This also contains
  the general purpose static methods for community URL and name
  parsing/validation).
- profile picture `keylen` is removed; pic keys must now always be 32
  bytes.
- the `pubkey` argument is gone from the `get_community` (previously
  `get_open`) method; we now will know the pubkey from the record if the
  record is found.
- `get_or_construct_community` still takes the pubkey, and the *given
  argument* pubkey becomes the pubkey in the object, even if what is
  stored is different.  (What is stored will be updated when the record
  is `set()`).
- fixed a bug where the outer service node entry (base URL key, plus "#"
  containing the pubkey) would remain in the config forever even after
  all rooms from that server were removed.
2023-02-14 18:26:45 -04:00

15 lines
223 B
C++

#pragma once
#include <cstdint>
namespace session::config {
enum class Namespace : std::int16_t {
UserProfile = 2,
Contacts = 3,
ConvoInfoVolatile = 4,
UserGroups = 5,
};
} // namespace session::config