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:
parent
809c9bdb57
commit
853b578551
4 changed files with 2 additions and 7 deletions
|
@ -69,8 +69,7 @@
|
||||||
name: contactDetails.name,
|
name: contactDetails.name,
|
||||||
id: contactDetails.number,
|
id: contactDetails.number,
|
||||||
avatar: contactDetails.avatar,
|
avatar: contactDetails.avatar,
|
||||||
type: 'private',
|
type: 'private'
|
||||||
active_at: null
|
|
||||||
}).save();
|
}).save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +81,6 @@
|
||||||
members: groupDetails.members,
|
members: groupDetails.members,
|
||||||
avatar: groupDetails.avatar,
|
avatar: groupDetails.avatar,
|
||||||
type: 'group',
|
type: 'group',
|
||||||
active_at: null
|
|
||||||
}).save();
|
}).save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
return {
|
return {
|
||||||
unreadCount : 0,
|
unreadCount : 0,
|
||||||
timestamp : timestamp,
|
timestamp : timestamp,
|
||||||
active_at : timestamp
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -180,7 +179,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
archive: function() {
|
archive: function() {
|
||||||
this.unset('active_at');
|
this.set({active_at: null});
|
||||||
},
|
},
|
||||||
|
|
||||||
destroyMessages: function() {
|
destroyMessages: function() {
|
||||||
|
|
|
@ -93,7 +93,6 @@
|
||||||
|
|
||||||
createConversation: function() {
|
createConversation: function() {
|
||||||
var conversation = new Whisper.Conversation({
|
var conversation = new Whisper.Conversation({
|
||||||
active_at: null,
|
|
||||||
id: this.getRecipients().at(0).id,
|
id: this.getRecipients().at(0).id,
|
||||||
type: 'private'
|
type: 'private'
|
||||||
});
|
});
|
||||||
|
|
|
@ -132,7 +132,6 @@
|
||||||
this.new_contact = new Whisper.ConversationListItemView({
|
this.new_contact = new Whisper.ConversationListItemView({
|
||||||
el: this.$new_contact,
|
el: this.$new_contact,
|
||||||
model: new Whisper.Conversation({
|
model: new Whisper.Conversation({
|
||||||
active_at: null,
|
|
||||||
type: 'private',
|
type: 'private',
|
||||||
newContact: true
|
newContact: true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue