Explorar el Código

Small bugfixes.

- Filter did the opposite of what it was supposed to do
- Wrong bind context
- Should actually be mam:2, issue was server misconfiguration
JC Brand hace 7 años
padre
commit
911ede2886
Se han modificado 3 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      src/converse-core.js
  2. 1 1
      src/converse-mam.js
  3. 1 1
      src/converse-rosterview.js

+ 1 - 1
src/converse-core.js

@@ -39,7 +39,7 @@
     Strophe.addNamespace('FORWARD', 'urn:xmpp:forward:0');
     Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
     Strophe.addNamespace('HTTPUPLOAD', 'urn:xmpp:http:upload:0');
-    Strophe.addNamespace('MAM', 'urn:xmpp:mam:1');
+    Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
     Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
     Strophe.addNamespace('OUTOFBAND', 'jabber:x:oob');
     Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');

+ 1 - 1
src/converse-mam.js

@@ -330,7 +330,7 @@
                         function (messages) {
                             that.clearSpinner();
                             if (messages.length) {
-                                _.each(messages, that.model.onMessage.bind(that));
+                                _.each(messages, that.model.onMessage.bind(that.model));
                             }
                         },
                         function () {

+ 1 - 1
src/converse-rosterview.js

@@ -635,7 +635,7 @@
                     } else  {
                         matches = this.model.contacts.filter((contact) => {
                             const value = contact.get('fullname') || contact.get('jid');
-                            return _.includes(value.toLowerCase(), q.toLowerCase());
+                            return !_.includes(value.toLowerCase(), q.toLowerCase());
                         });
                     }
                     return matches;