Change default value for active_at

We're overriding the default with null often enough that we should
just change the default.

Consequently, no more phantom blank conversations with oneself should
appear after receiving a group update. They were being added to the
inbox because they were incorrectly initialized with an active_at value.

Fixes #281
This commit is contained in:
lilia 2015-07-14 16:40:09 -07:00
parent 809c9bdb57
commit 853b578551
4 changed files with 2 additions and 7 deletions

View file

@ -69,8 +69,7 @@
name: contactDetails.name,
id: contactDetails.number,
avatar: contactDetails.avatar,
type: 'private',
active_at: null
type: 'private'
}).save();
}
@ -82,7 +81,6 @@
members: groupDetails.members,
avatar: groupDetails.avatar,
type: 'group',
active_at: null
}).save();
}

View file

@ -27,7 +27,6 @@
return {
unreadCount : 0,
timestamp : timestamp,
active_at : timestamp
};
},
@ -180,7 +179,7 @@
},
archive: function() {
this.unset('active_at');
this.set({active_at: null});
},
destroyMessages: function() {

View file

@ -93,7 +93,6 @@
createConversation: function() {
var conversation = new Whisper.Conversation({
active_at: null,
id: this.getRecipients().at(0).id,
type: 'private'
});

View file

@ -132,7 +132,6 @@
this.new_contact = new Whisper.ConversationListItemView({
el: this.$new_contact,
model: new Whisper.Conversation({
active_at: null,
type: 'private',
newContact: true
})