Bugfix. Send model instance to event listeners

So that we can call `getDisplayName`
This commit is contained in:
JC Brand 2018-05-07 10:58:58 +02:00
parent b8679063c5
commit 7e94f3c691
2 changed files with 5 additions and 3 deletions

View File

@ -161,7 +161,10 @@ contactRequest
Someone has requested to subscribe to your presence (i.e. to be your contact).
``_converse.api.listen.on('contactRequest', function (user_data) { ... });``
The `Backbone.Model <http://backbonejs.org/#Model>`_ instance representing the
roster contact is passed to the event listener.
``_converse.api.listen.on('contactRequest', function (contact) { ... });``
contactRemoved
~~~~~~~~~~~~~~

View File

@ -600,8 +600,7 @@
'requesting': true,
'nickname': nickname
};
this.create(user_data);
_converse.emit('contactRequest', user_data);
_converse.emit('contactRequest', this.create(user_data));
},
handleIncomingSubscription (presence) {