@@ -48,7 +48,7 @@ namespace session::config {
4848// / j - Unix timestamp (seconds) when the contact was created ("j" to match user_groups
4949// / equivalent "j"oined field). Omitted if 0.
5050// / t - The `profile_updated` unix timestamp (seconds) for this contacts profile information.
51- // / f - session pro features bitset for this contact
51+ // / f - session pro profile features bitset for this contact
5252// /
5353// / b - dict of blinded contacts. This is a nested dict where the outer keys are the BASE_URL of
5454// / the community the blinded contact originated from and the outer value is a dict containing:
@@ -70,7 +70,7 @@ namespace session::config {
7070// / j - Unix timestamp (seconds) when the contact was created ("j" to match user_groups
7171// / equivalent "j"oined field). Omitted if 0.
7272// / y - flag indicating whether the blinded message request is using legac"y" blinding.
73- // / f - session pro features bitset for this blinded contact
73+ // / f - session pro profile features bitset for this blinded contact
7474
7575struct contact_info {
7676 static constexpr size_t MAX_NAME_LENGTH = 100 ;
@@ -96,7 +96,7 @@ struct contact_info {
9696 std::chrono::seconds exp_timer{0 }; // The expiration timer (in seconds)
9797 int64_t created = 0 ; // Unix timestamp (seconds) when this contact was added
9898
99- SESSION_PROTOCOL_PRO_FEATURES pro_features = SESSION_PROTOCOL_PRO_FEATURES_NIL ;
99+ ProProfileBitset profile_bitset = {} ;
100100
101101 explicit contact_info (std::string sid);
102102
@@ -122,25 +122,6 @@ struct contact_info {
122122 void set_nickname (std::string nickname);
123123 void set_nickname_truncated (std::string nickname);
124124
125- // / API: contacts/contact_info::get_pro_features
126- // /
127- // / Retrieves the bitset indicating which pro features the user currently has enabled.
128- // /
129- // / Inputs: None
130- // /
131- // / Outputs:
132- // / - `SESSION_PROTOCOL_PRO_FEATURES` - bitset indicating which pro features are enabled.
133- SESSION_PROTOCOL_PRO_FEATURES get_pro_features () const ;
134-
135- // / API: contacts/contact_info::set_pro_features
136- // /
137- // / Updates the pro features bitset for this contact. Note: If the bitset provided contains the
138- // / '10K_CHARACTER_LIMIT' feature then it will be removed.
139- // /
140- // / Inputs:
141- // / - `features` -- The updated pro features bitset to use.
142- void set_pro_features (SESSION_PROTOCOL_PRO_FEATURES features);
143-
144125 private:
145126 friend class Contacts ;
146127 void load (const dict& info_dict);
@@ -160,7 +141,7 @@ struct blinded_contact_info {
160141 bool legacy_blinding;
161142 std::chrono::sys_seconds created{}; // Unix timestamp (seconds) when this contact was added
162143
163- SESSION_PROTOCOL_PRO_FEATURES pro_features = SESSION_PROTOCOL_PRO_FEATURES_NIL ;
144+ ProProfileBitset profile_bitset = {} ;
164145
165146 blinded_contact_info () = default ;
166147 explicit blinded_contact_info (
@@ -219,25 +200,6 @@ struct blinded_contact_info {
219200 // / - `std::string` -- Returns the pubkey
220201 std::string community_pubkey_hex () const { return comm.pubkey_hex (); }
221202
222- // / API: contacts/blinded_contact_info::get_pro_features
223- // /
224- // / Retrieves the bitset indicating which pro features the user currently has enabled.
225- // /
226- // / Inputs: None
227- // /
228- // / Outputs:
229- // / - `SESSION_PROTOCOL_PRO_FEATURES` - bitset indicating which pro features are enabled.
230- SESSION_PROTOCOL_PRO_FEATURES get_pro_features () const ;
231-
232- // / API: contacts/blinded_contact_info::set_pro_features
233- // /
234- // / Updates the pro features bitset for this contact. Note: If the bitset provided contains the
235- // / '10K_CHARACTER_LIMIT' feature then it will be removed.
236- // /
237- // / Inputs:
238- // / - `features` -- The updated pro features bitset to use.
239- void set_pro_features (SESSION_PROTOCOL_PRO_FEATURES features);
240-
241203 private:
242204 friend class Contacts ;
243205 friend struct session ::config::comm_iterator_helper;
@@ -480,9 +442,8 @@ class Contacts : public ConfigBase {
480442 // /
481443 // / Inputs:
482444 // / - `session_id` -- hex string of the session id
483- // / - `features` -- The updated pro features bitset to use. Note: If the bitset provided
484- // / contains the '10K_CHARACTER_LIMIT' feature then it will be removed.
485- void set_pro_features (std::string_view session_id, SESSION_PROTOCOL_PRO_FEATURES features);
445+ // / - `features` -- The updated profile features to use
446+ void set_pro_features (std::string_view session_id, ProProfileBitset features);
486447
487448 // / API: contacts/contacts::erase
488449 // /
0 commit comments