Fix blank lastMessage for non-text messages
For non text messages (ex: media messages and group updates), the lastMessage field was being populated with empty string, resulting in an empty message preview in the conversation list. Instead, display 'Media message' or 'Updated the group', etc... // FREEBIE
This commit is contained in:
parent
b18cfd75de
commit
503509fc8f
1 changed files with 2 additions and 2 deletions
|
@ -307,12 +307,12 @@
|
|||
if (!conversation_timestamp || message.get('sent_at') > conversation_timestamp) {
|
||||
conversation.set({
|
||||
timestamp: message.get('sent_at'),
|
||||
lastMessage: message.get('body')
|
||||
lastMessage: message.getDescription()
|
||||
});
|
||||
}
|
||||
else if (!conversation.get('lastMessage')) {
|
||||
conversation.set({
|
||||
lastMessage: message.get('body')
|
||||
lastMessage: message.getDescription()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue