Allow stanza listener to be registered without options obj
This commit is contained in:
parent
36a875a402
commit
d3767426f6
@ -145,7 +145,12 @@
|
|||||||
converse.off(evt, handler);
|
converse.off(evt, handler);
|
||||||
},
|
},
|
||||||
'stanza': function (name, options, handler) {
|
'stanza': function (name, options, handler) {
|
||||||
|
if (typeof options === 'function') {
|
||||||
|
handler = options;
|
||||||
|
options = {};
|
||||||
|
} else {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
}
|
||||||
converse.connection.addHandler(
|
converse.connection.addHandler(
|
||||||
handler,
|
handler,
|
||||||
options.ns,
|
options.ns,
|
||||||
|
Loading…
Reference in New Issue
Block a user