Send timer update messages when changing the timer
This commit is contained in:
parent
824b7417e9
commit
6074a29046
3 changed files with 112 additions and 30 deletions
|
@ -182,10 +182,18 @@
|
|||
}
|
||||
});
|
||||
message.save();
|
||||
return message;
|
||||
},
|
||||
sendExpirationTimerUpdate: function(time) {
|
||||
this.addExpirationTimerUpdate(time, textsecure.storage.user.getNumber());
|
||||
// todo: send.
|
||||
var message = this.addExpirationTimerUpdate(time, textsecure.storage.user.getNumber());
|
||||
var sendFunc;
|
||||
if (this.get('type') == 'private') {
|
||||
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;
|
||||
}
|
||||
else {
|
||||
sendFunc = textsecure.messaging.sendExpirationTimerUpdateToGroup;
|
||||
}
|
||||
message.send(sendFunc(this.get('id'), this.get('expireTimer'), message.get('sent_at')));
|
||||
},
|
||||
|
||||
isSearchable: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue