From dd7ca8c48bb79853499acd015928421a15b16159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Barbeito=20Garc=C3=ADa?= Date: Fri, 27 Feb 2015 23:44:23 +0100 Subject: [PATCH] added missing extended_presence parameter in join function. added bower_components/ to .gitignore --- .gitignore | 1 + muc/strophe.muc.coffee | 2 +- muc/strophe.muc.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index afacd13..3258754 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.min.js +bower_components/ doc/ ndproj/ node_modules diff --git a/muc/strophe.muc.coffee b/muc/strophe.muc.coffee index 2cec909..2e258f2 100644 --- a/muc/strophe.muc.coffee +++ b/muc/strophe.muc.coffee @@ -42,7 +42,7 @@ Strophe.addConnectionPlugin 'muc', (Object) history_attrs - Optional attributes for retrieving history (XML DOM Element) extended_presence - Optional XML for extending presence ### - join: (room, nick, msg_handler_cb, pres_handler_cb, roster_cb, password, history_attrs) -> + join: (room, nick, msg_handler_cb, pres_handler_cb, roster_cb, password, history_attrs, extended_presence) -> room_nick = @test_append_nick(room, nick) msg = $pres( from: @_connection.jid diff --git a/muc/strophe.muc.js b/muc/strophe.muc.js index 8421618..aa53cfb 100644 --- a/muc/strophe.muc.js +++ b/muc/strophe.muc.js @@ -48,7 +48,7 @@ (Object) history_attrs - Optional attributes for retrieving history (XML DOM Element) extended_presence - Optional XML for extending presence */ - join: function(room, nick, msg_handler_cb, pres_handler_cb, roster_cb, password, history_attrs) { + join: function(room, nick, msg_handler_cb, pres_handler_cb, roster_cb, password, history_attrs, extended_presence) { var msg, room_nick; room_nick = this.test_append_nick(room, nick); msg = $pres({ @@ -63,7 +63,7 @@ if (password != null) { msg.cnode(Strophe.xmlElement("password", [], password)); } - if (typeof extended_presence !== "undefined" && extended_presence !== null) { + if (extended_presence != null) { msg.up.cnode(extended_presence); } if (this._muc_handler == null) {