From d3b5960528f8e422065223af277764ecb025145a Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Thu, 31 Aug 2023 23:05:50 +0200 Subject: [PATCH] Fix storage of joinedAtVersion in groups --- ts/groups.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/groups.ts b/ts/groups.ts index ed3b7389b..756429094 100644 --- a/ts/groups.ts +++ b/ts/groups.ts @@ -5566,7 +5566,7 @@ async function applyGroupState({ return { role: member.role || MEMBER_ROLE_ENUM.DEFAULT, - joinedAtVersion: member.joinedAtVersion || version, + joinedAtVersion: member.joinedAtVersion, aci: member.userId, }; }); @@ -6665,7 +6665,7 @@ type DecryptedMember = Readonly<{ userId: AciString; profileKey: Uint8Array; role: Proto.Member.Role; - joinedAtVersion?: number; + joinedAtVersion: number; }>; function decryptMember( @@ -6716,7 +6716,7 @@ function decryptMember( userId, profileKey, role, - joinedAtVersion: dropNull(member.joinedAtVersion), + joinedAtVersion: dropNull(member.joinedAtVersion) ?? 0, }; }