Commit 7e94f3c6 authored by JC Brand's avatar JC Brand

Bugfix. Send model instance to event listeners

So that we can call `getDisplayName`
parent b8679063
...@@ -161,7 +161,10 @@ contactRequest ...@@ -161,7 +161,10 @@ contactRequest
Someone has requested to subscribe to your presence (i.e. to be your contact). 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 contactRemoved
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
......
...@@ -600,8 +600,7 @@ ...@@ -600,8 +600,7 @@
'requesting': true, 'requesting': true,
'nickname': nickname 'nickname': nickname
}; };
this.create(user_data); _converse.emit('contactRequest', this.create(user_data));
_converse.emit('contactRequest', user_data);
}, },
handleIncomingSubscription (presence) { handleIncomingSubscription (presence) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment