Added new Changes flag for user notes.

This commit is contained in:
23rd
2025-10-02 10:31:46 +03:00
committed by John Preston
parent 028437549d
commit d36d5b2980
2 changed files with 21 additions and 17 deletions
+17 -16
View File
@@ -100,28 +100,29 @@ struct PeerUpdate {
PaysPerMessage = (1ULL << 36),
GiftSettings = (1ULL << 37),
StarsRating = (1ULL << 38),
ContactNote = (1ULL << 39),
// For chats and channels
InviteLinks = (1ULL << 39),
Members = (1ULL << 40),
Admins = (1ULL << 41),
BannedUsers = (1ULL << 42),
Rights = (1ULL << 43),
PendingRequests = (1ULL << 44),
Reactions = (1ULL << 45),
InviteLinks = (1ULL << 40),
Members = (1ULL << 41),
Admins = (1ULL << 42),
BannedUsers = (1ULL << 43),
Rights = (1ULL << 44),
PendingRequests = (1ULL << 45),
Reactions = (1ULL << 46),
// For channels
ChannelAmIn = (1ULL << 46),
StickersSet = (1ULL << 47),
EmojiSet = (1ULL << 48),
DiscussionLink = (1ULL << 49),
MonoforumLink = (1ULL << 50),
ChannelLocation = (1ULL << 51),
Slowmode = (1ULL << 52),
GroupCall = (1ULL << 53),
ChannelAmIn = (1ULL << 47),
StickersSet = (1ULL << 48),
EmojiSet = (1ULL << 49),
DiscussionLink = (1ULL << 50),
MonoforumLink = (1ULL << 51),
ChannelLocation = (1ULL << 52),
Slowmode = (1ULL << 53),
GroupCall = (1ULL << 54),
// For iteration
LastUsedBit = (1ULL << 53),
LastUsedBit = (1ULL << 54),
};
using Flags = base::flags<Flag>;
friend inline constexpr auto is_flag_type(Flag) { return true; }
+4 -1
View File
@@ -770,7 +770,10 @@ const TextWithEntities &UserData::note() const {
}
void UserData::setNote(const TextWithEntities &note) {
_note = note;
if (_note != note) {
_note = note;
session().changes().peerUpdated(this, UpdateFlag::ContactNote);
}
}
namespace Data {