Commit d3767426 authored by JC Brand's avatar JC Brand

Allow stanza listener to be registered without options obj

parent 36a875a4
......@@ -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,
......
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