Fix wrong contact in some timer updates
Mistakenly showed 'You' for timer updates inferred from incoming messages.
This commit is contained in:
parent
73e69fe5eb
commit
4ee2652367
2 changed files with 12 additions and 1 deletions
|
@ -120,6 +120,17 @@
|
|||
id: this.get('conversationId')
|
||||
});
|
||||
},
|
||||
getExpirationTimerUpdateSource: function() {
|
||||
if (this.isExpirationTimerUpdate()) {
|
||||
var conversationId = this.get('expirationTimerUpdate').source;
|
||||
var c = ConversationController.get(conversationId);
|
||||
if (!c) {
|
||||
c = ConversationController.create({id: conversationId, type: 'private'});
|
||||
c.fetch();
|
||||
}
|
||||
return c;
|
||||
}
|
||||
},
|
||||
getContact: function() {
|
||||
var conversationId = this.get('source');
|
||||
if (!this.isIncoming()) {
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
return this.model.id;
|
||||
},
|
||||
initialize: function() {
|
||||
this.conversation = this.model.getContact();
|
||||
this.conversation = this.model.getExpirationTimerUpdateSource();
|
||||
this.listenTo(this.conversation, 'change', this.render);
|
||||
},
|
||||
render_attributes: function() {
|
||||
|
|
Loading…
Reference in a new issue