Update Backbone types: attributes is T - and fix failing type checks

This commit is contained in:
Scott Nonnenberg 2023-01-05 13:58:13 -08:00 committed by GitHub
parent c65a7d0a14
commit b8234765bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 24 deletions

View file

@ -358,6 +358,12 @@ export async function getPreJoinGroupInfo(
export function buildGroupLink(conversation: ConversationModel): string {
const { masterKey, groupInviteLinkPassword } = conversation.attributes;
strictAssert(masterKey, 'buildGroupLink requires the master key!');
strictAssert(
groupInviteLinkPassword,
'buildGroupLink requires the groupInviteLinkPassword!'
);
const bytes = Proto.GroupInviteLink.encode({
v1Contents: {
groupMasterKey: Bytes.fromBase64(masterKey),