Convert and store new group changes in MessageExtras.

This commit is contained in:
Clark
2024-02-26 10:43:51 -05:00
committed by Alex Hart
parent cc25f0685c
commit 1ade8b502f
17 changed files with 933 additions and 56 deletions

View File

@@ -52,7 +52,7 @@ message AccountData {
bool linkPreviews = 5;
bool notDiscoverableByPhoneNumber = 6;
bool preferContactAvatars = 7;
uint32 universalExpireTimer = 8;
uint32 universalExpireTimer = 8; // 0 means no universal expire timer.
repeated string preferredReactionEmoji = 9;
bool displayBadgesOnProfile = 10;
bool keepMutedChatsArchived = 11;
@@ -132,7 +132,7 @@ message Chat {
uint64 recipientId = 2;
bool archived = 3;
uint32 pinnedOrder = 4; // 0 = unpinned, otherwise chat is considered pinned and will be displayed in ascending order
uint64 expirationTimerMs = 5;
uint64 expirationTimerMs = 5; // 0 = no expire timer.
uint64 muteUntilMs = 6;
bool markedUnread = 7;
bool dontNotifyForMentionsIfMuted = 8;
@@ -537,8 +537,10 @@ message SimpleChatUpdate {
Type type = 1;
}
// For 1:1 chat updates only.
// For group thread updates use GroupExpirationTimerUpdate.
message ExpirationTimerChatUpdate {
uint32 expiresInMs = 1;
uint32 expiresInMs = 1; // 0 means the expiration timer was disabled
}
message ProfileChangeChatUpdate {
@@ -591,6 +593,7 @@ message GroupChangeChatUpdate {
GroupV2MigrationInvitedMembersUpdate groupV2MigrationInvitedMembersUpdate = 31;
GroupV2MigrationDroppedMembersUpdate groupV2MigrationDroppedMembersUpdate = 32;
GroupSequenceOfRequestsAndCancelsUpdate groupSequenceOfRequestsAndCancelsUpdate = 33;
GroupExpirationTimerUpdate groupExpirationTimerUpdate = 34;
}
}
@@ -794,6 +797,12 @@ message GroupV2MigrationDroppedMembersUpdate {
int32 droppedMembersCount = 1;
}
// For 1:1 timer updates, use ExpirationTimerChatUpdate.
message GroupExpirationTimerUpdate {
uint32 expiresInMs = 1; // 0 means the expiration timer was disabled
optional bytes updaterAci = 2;
}
message StickerPack {
bytes id = 1;
bytes key = 2;

View File

@@ -376,7 +376,10 @@ message ExternalLaunchTransactionState {
}
message MessageExtras {
GV2UpdateDescription gv2UpdateDescription = 1;
oneof extra {
GV2UpdateDescription gv2UpdateDescription = 1;
signalservice.GroupContext gv1Context = 2;
}
}
message GV2UpdateDescription {