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);
|
||||
},
|
||||
'stanza': function (name, options, handler) {
|
||||
options = options || {};
|
||||
if (typeof options === 'function') {
|
||||
handler = options;
|
||||
options = {};
|
||||
} else {
|
||||
options = options || {};
|
||||
}
|
||||
converse.connection.addHandler(
|
||||
handler,
|
||||
options.ns,
|
||||
|
Loading…
Reference in New Issue
Block a user