Conversation.updateLastMessage: fix indent, use of null message

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-06-15 16:11:31 -07:00
parent 36c28296e9
commit aebf4b32d6

View file

@ -409,10 +409,10 @@
var collection = new Whisper.MessageCollection();
return collection.fetchConversation(this.id, 1).then(function() {
var lastMessage = collection.at(0);
if (lastMessage) {
if (lastMessage.get('type') === 'verified-change') {
return;
}
if (lastMessage) {
this.set({
lastMessage : lastMessage.getNotificationText(),
timestamp : lastMessage.get('sent_at')