diff --git a/js/models/messages.js b/js/models/messages.js index 4087aeaea0..b0cfbad95f 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -97,9 +97,16 @@ return this.imageUrl; }, getContact: function() { - if (this.collection) { - return this.collection.conversation.contactCollection.get(this.get('source')); + var conversationId = this.get('source'); + if (!this.isIncoming()) { + conversationId = textsecure.storage.user.getNumber(); } + var c = ConversationController.get(conversationId); + if (!c) { + c = ConversationController.create(conversationId); + c.fetch(); + } + return c; }, isOutgoing: function() { return this.get('type') === 'outgoing';