2
0
Эх сурвалжийг харах

Update plugins to not depend on converse-core

To illustrate that this is not necessary (and also not possible with
non-bundled plugins).
JC Brand 8 жил өмнө
parent
commit
761970c903

+ 1 - 1
src/converse-core.js

@@ -1134,7 +1134,7 @@
                  * Note: this method gets completely overridden by converse-vcard.js
                  */
                 var bare_jid = Strophe.getBareJidFromJid(presence.getAttribute('from'));
-                var nick_el = presence.querySelector('nick[xmlns='+Strophe.NS.NICK+']');
+                var nick_el = presence.querySelector('nick[xmlns="'+Strophe.NS.NICK+'"]');
                 var user_data = {
                     jid: bare_jid,
                     subscription: 'none',

+ 3 - 2
src/converse-headline.js

@@ -14,8 +14,7 @@
 }(this, function (converse) {
     "use strict";
     var _ = converse.env._,
-        utils = converse.env.utils,
-        __ = utils.__.bind(converse);
+        utils = converse.env.utils;
 
     var onHeadlineMessage = function (message) {
         /* Handler method for all incoming messages of type "headline".
@@ -33,7 +32,9 @@
         return true;
     };
 
+
     converse.plugins.add('converse-headline', {
+
         overrides: {
             // Overrides mentioned here will be picked up by converse.js's
             // plugin architecture they will replace existing methods on the

+ 1 - 0
src/converse-notification.js

@@ -22,6 +22,7 @@
              * loaded by converse.js's plugin machinery.
              */
             var _converse = this._converse;
+
             // For translations
             var __ = _converse.__;
             var ___ = _converse.___;