|
|
@ -2235,6 +2235,10 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
message.set({ id });
|
|
|
|
message.set({ id });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('[vince] conversations.js --> groupUpdate:', groupUpdate);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const options = this.getSendOptions();
|
|
|
|
const options = this.getSendOptions();
|
|
|
|
message.send(
|
|
|
|
message.send(
|
|
|
|
this.wrapSend(
|
|
|
|
this.wrapSend(
|
|
|
@ -2271,31 +2275,33 @@
|
|
|
|
if (this.get('type') === 'group') {
|
|
|
|
if (this.get('type') === 'group') {
|
|
|
|
const groupNumbers = this.getRecipients();
|
|
|
|
const groupNumbers = this.getRecipients();
|
|
|
|
this.set({ left: true });
|
|
|
|
this.set({ left: true });
|
|
|
|
await window.Signal.Data.updateConversation(this.id, this.attributes, {
|
|
|
|
|
|
|
|
Conversation: Whisper.Conversation,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const message = this.messageCollection.add({
|
|
|
|
|
|
|
|
group_update: { left: 'You' },
|
|
|
|
|
|
|
|
conversationId: this.id,
|
|
|
|
|
|
|
|
type: 'outgoing',
|
|
|
|
|
|
|
|
sent_at: now,
|
|
|
|
|
|
|
|
received_at: now,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const id = await window.Signal.Data.saveMessage(message.attributes, {
|
|
|
|
// await window.Signal.Data.updateConversation(this.id, this.attributes, {
|
|
|
|
Message: Whisper.Message,
|
|
|
|
// Conversation: Whisper.Conversation,
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
message.set({ id });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const options = this.getSendOptions();
|
|
|
|
// const message = this.messageCollection.add({
|
|
|
|
message.send(
|
|
|
|
// group_update: { left: 'You' },
|
|
|
|
this.wrapSend(
|
|
|
|
// conversationId: this.id,
|
|
|
|
textsecure.messaging.leaveGroup(this.id, groupNumbers, options)
|
|
|
|
// type: 'outgoing',
|
|
|
|
)
|
|
|
|
// sent_at: now,
|
|
|
|
);
|
|
|
|
// received_at: now,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const id = await window.Signal.Data.saveMessage(message.attributes, {
|
|
|
|
|
|
|
|
// Message: Whisper.Message,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// message.set({ id });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const options = this.getSendOptions();
|
|
|
|
|
|
|
|
// message.send(
|
|
|
|
|
|
|
|
// this.wrapSend(
|
|
|
|
|
|
|
|
// textsecure.messaging.leaveGroup(this.id, groupNumbers, options)
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
this.updateTextInputState();
|
|
|
|
// this.updateTextInputState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|