|
|
|
@ -193,7 +193,8 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ConversationController.findOrCreateById(id, 'private').then(function(conversation) {
|
|
|
|
|
return ConversationController.findOrCreateById(id, 'private')
|
|
|
|
|
.then(function(conversation) {
|
|
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
|
|
conversation.save({
|
|
|
|
|
name: details.name,
|
|
|
|
@ -202,7 +203,14 @@
|
|
|
|
|
active_at: conversation.get('active_at') || Date.now(),
|
|
|
|
|
}).then(resolve, reject);
|
|
|
|
|
});
|
|
|
|
|
}).then(ev.confirm);
|
|
|
|
|
})
|
|
|
|
|
.then(ev.confirm)
|
|
|
|
|
.catch(function(error) {
|
|
|
|
|
console.log(
|
|
|
|
|
'onContactReceived error:',
|
|
|
|
|
error && error.stack ? error.stack : error
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onGroupReceived(ev) {
|
|
|
|
|