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:
parent
b4960b29d8
commit
760bfffb50
5 changed files with 69 additions and 18 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue