Browse Source

Bugfix. fixes #180

JC Brand 11 years ago
parent
commit
3423f7bc74
2 changed files with 3 additions and 2 deletions
  1. 2 2
      converse.js
  2. 1 0
      docs/CHANGES.rst

+ 2 - 2
converse.js

@@ -3779,13 +3779,13 @@
         },
         'getRID': function () {
             if (converse.expose_rid_and_sid && typeof converse.connection !== "undefined") {
-                return converse.connection._proto.rid;
+                return converse.connection.rid || converse.connection._proto.rid;
             }
             return null;
         },
         'getSID': function () {
             if (converse.expose_rid_and_sid && typeof converse.connection !== "undefined") {
-                return converse.connection._proto.sid;
+                return converse.connection.sid || converse.connection._proto.sid;
             }
             return null;
         },

+ 1 - 0
docs/CHANGES.rst

@@ -25,6 +25,7 @@ Changelog
 * #132 Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html'>`_.
   Configured via `enable_message_carbons <https://conversejs.org/docs/html/index.html#enable_message_carbons>`_ [hejazee]
 * #176 Add support for caching in sessionStorage as opposed to localStorage. [jcbrand]
+* #180 RID and SID undefined [g8g3]
 * #191 No messages history [heban]
 * #192 Error: xhr_user_search_url is not defined. [jcbrand]