Fixes #806 Event listeners not triggered.

Functions need to be bound.
This commit is contained in:
JC Brand 2017-03-08 11:52:41 +00:00
parent f1bf5a9654
commit 5efb7fbf82
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
## 3.0.1 (Unreleased)
- #806 The `_converse.listen` API event listeners aren't triggered. [jcbrand]
- #807 Error: Plugin "converse-dragresize" tried to override HeadlinesBoxView but it's not found. [jcbrand]
## 3.0.0 (2017-03-05)

View File

@ -2208,9 +2208,9 @@
}
},
'listen': {
'once': _converse.once,
'on': _converse.on,
'not': _converse.off,
'once': _converse.once.bind(_converse),
'on': _converse.on.bind(_converse),
'not': _converse.off.bind(_converse),
'stanza': function (name, options, handler) {
if (_.isFunction(options)) {
handler = options;