Conversation.updateLastMessage: fix indent, use of null message
FREEBIE
This commit is contained in:
@@ -409,10 +409,10 @@
|
|||||||
var collection = new Whisper.MessageCollection();
|
var collection = new Whisper.MessageCollection();
|
||||||
return collection.fetchConversation(this.id, 1).then(function() {
|
return collection.fetchConversation(this.id, 1).then(function() {
|
||||||
var lastMessage = collection.at(0);
|
var lastMessage = collection.at(0);
|
||||||
|
if (lastMessage) {
|
||||||
if (lastMessage.get('type') === 'verified-change') {
|
if (lastMessage.get('type') === 'verified-change') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (lastMessage) {
|
|
||||||
this.set({
|
this.set({
|
||||||
lastMessage : lastMessage.getNotificationText(),
|
lastMessage : lastMessage.getNotificationText(),
|
||||||
timestamp : lastMessage.get('sent_at')
|
timestamp : lastMessage.get('sent_at')
|
||||||
|
Reference in New Issue
Block a user