Wire up end session and leave group

Closes #136
Closes #137
This commit is contained in:
lilia 2015-02-12 20:36:44 -08:00
parent 85b4643e9b
commit 488f25635d
2 changed files with 26 additions and 0 deletions

View file

@ -106,6 +106,19 @@
});
},
endSession: function() {
if (this.get('type') === 'private') {
textsecure.messaging.closeSession(this.id);
}
},
leaveGroup: function() {
if (this.get('type') === 'group') {
textsecure.messaging.leaveGroup(this.id);
}
},
receiveMessage: function(decrypted) {
var conversation = this;
var timestamp = decrypted.pushMessage.timestamp.toNumber();