Let messages fetch references to senders
The conversation's contactCollection only contains references to the current membership, and will not provide contact info for people who have left the group, causing their messages to render without numbers or avatars. // FREEBIE
This commit is contained in:
		
					parent
					
						
							
								fd29ac8d2c
							
						
					
				
			
			
				commit
				
					
						2bc65c2ab4
					
				
			
		
					 1 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
					@ -97,9 +97,16 @@
 | 
				
			||||||
            return this.imageUrl;
 | 
					            return this.imageUrl;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        getContact: function() {
 | 
					        getContact: function() {
 | 
				
			||||||
            if (this.collection) {
 | 
					            var conversationId = this.get('source');
 | 
				
			||||||
                return this.collection.conversation.contactCollection.get(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() {
 | 
					        isOutgoing: function() {
 | 
				
			||||||
            return this.get('type') === 'outgoing';
 | 
					            return this.get('type') === 'outgoing';
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue