Backwards compatibility updates for libsignal-client

This commit is contained in:
Scott Nonnenberg 2021-02-12 09:43:24 -08:00
parent 34285054f6
commit bc0f4387fe
4 changed files with 28 additions and 6 deletions

View file

@ -4023,6 +4023,12 @@ export class ConversationModel extends window.Backbone.Model<
async leaveGroup(): Promise<void> {
const now = Date.now();
if (this.get('type') === 'group') {
const groupId = this.get('groupId');
if (!groupId) {
throw new Error(`leaveGroup/${this.idForLogging()}: No groupId!`);
}
const groupIdentifiers = this.getRecipients();
this.set({ left: true });
window.Signal.Data.updateConversation(this.attributes);
@ -4048,7 +4054,7 @@ export class ConversationModel extends window.Backbone.Model<
message.send(
this.wrapSend(
window.textsecure.messaging.leaveGroup(
this.id,
groupId,
groupIdentifiers,
options
)