Add clock svg style

This commit is contained in:
lilia 2016-09-26 23:15:20 -07:00
parent 7331d967d2
commit 4cd2c03687
11 changed files with 110 additions and 13 deletions

View file

@ -166,6 +166,21 @@
}.bind(this));
},
addExpirationTimerUpdate: function(source, time) {
var now = Date.now();
var message = this.messageCollection.add({
conversationId : this.id,
type : 'expirationTimerUpdate',
sent_at : now,
received_at : now,
timerUpdate : {
expireTimer : time,
source : source
}
});
message.save();
},
isSearchable: function() {
return !this.get('left') || !!this.get('lastMessage');
},

View file

@ -126,6 +126,15 @@
}
return c;
},
getModelForExpirationTimerUpdate: function() {
var id = this.get('timerUpdate').source;
var c = ConversationController.get(id);
if (!c) {
c = ConversationController.create({ id: id, type: 'private' });
c.fetch();
}
return c;
},
isOutgoing: function() {
return this.get('type') === 'outgoing';
},