Show all contacts all the time

Contacts without conversation identity appear in alphabetical order at
the end of the inbox.

// FREEBIE
This commit is contained in:
lilia 2016-03-17 21:42:03 -07:00
parent b4960b29d8
commit 760bfffb50
5 changed files with 69 additions and 18 deletions

View file

@ -123,22 +123,26 @@
name: contactDetails.name,
id: contactDetails.number,
avatar: contactDetails.avatar,
type: 'private'
type: 'private',
active_at: Date.now()
}).save();
}
function onGroupReceived(ev) {
var groupDetails = ev.groupDetails;
var conversation = ConversationController.create({
var attributes = {
id: groupDetails.id,
name: groupDetails.name,
members: groupDetails.members,
avatar: groupDetails.avatar,
type: 'group',
});
if (!groupDetails.active) {
conversation.set({left: true});
};
if (groupDetails.active) {
attributes.active_at = Date.now();
} else {
attributes.left = true;
}
var conversation = ConversationController.create(attributes);
conversation.save();
}