Merge pull request #1239 from Bilb/fix-closed-gorup-updates-with-1.0.9

pull/1243/head
Audric Ackermann 5 years ago committed by GitHub
commit 91f2632cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -700,7 +700,7 @@
return; return;
} }
const nullAvatar = ''; const nullAvatar = undefined;
if (avatar) { if (avatar) {
// would get to download this file on each client in the group // would get to download this file on each client in the group
// and reference the local file // and reference the local file
@ -831,7 +831,7 @@
recipients: allMembers, recipients: allMembers,
active: true, active: true,
expireTimer: 0, expireTimer: 0,
avatar: '', avatar: undefined,
}, },
confirm: () => {}, confirm: () => {},
}; };

@ -43,6 +43,13 @@ export abstract class ClosedGroupUpdateMessage extends ClosedGroupMessage {
throw new Error('admins has not the correct type'); throw new Error('admins has not the correct type');
} }
if (
params.avatar !== undefined &&
!(params.avatar instanceof SignalService.AttachmentPointer)
) {
throw new Error('avatar has not the correct type');
}
this.name = params.name; this.name = params.name;
this.members = params.members; this.members = params.members;
this.admins = params.admins; this.admins = params.admins;

Loading…
Cancel
Save