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

Split API into public and private (plugin only) parts.

JC Brand 8 жил өмнө
parent
commit
a30cf931b8

+ 0 - 19
docs/source/developer_api.rst

@@ -670,9 +670,7 @@ To open a single chat box, provide the JID of the contact:
 
     converse.plugins.add('myplugin', {
         initialize: function () {
-
             this._converse.chats.open('buddy@example.com')
-
         }
     });
 
@@ -682,9 +680,7 @@ To return an array of chat boxes, provide an array of JIDs:
 
     converse.plugins.add('myplugin', {
         initialize: function () {
-
             this._converse.chats.open(['buddy1@example.com', 'buddy2@example.com'])
-
         }
     });
 
@@ -743,7 +739,6 @@ It takes 3 parameters:
 
     converse.plugins.add('myplugin', {
         initialize: function () {
-
             var nick = 'dread-pirate-roberts';
             var create_if_not_found = true;
             this._converse.rooms.open(
@@ -751,7 +746,6 @@ It takes 3 parameters:
                 {'nick': nick},
                 create_if_not_found
             )
-
         }
     });
 
@@ -957,11 +951,7 @@ grouping:
 
 .. code-block:: javascript
 
-<<<<<<< 3699a0af5c53a1ba4f8fd030421e4f976368b404
         _converse.listen.on('message', function (messageXML) { ... });
-=======
-        converse.listen.on('message', function (messageXML) { ... });
->>>>>>> Replace jQuery-based event emitter with Backbone.Events
 
 * **once(eventName, callback, [context])**:
 
@@ -978,11 +968,7 @@ grouping:
 
 .. code-block:: javascript
 
-<<<<<<< 3699a0af5c53a1ba4f8fd030421e4f976368b404
         _converse.listen.once('message', function (messageXML) { ... });
-=======
-        converse.listen.once('message', function (messageXML) { ... });
->>>>>>> Replace jQuery-based event emitter with Backbone.Events
 
 * **not(eventName, callback)**
 
@@ -997,9 +983,4 @@ grouping:
 
 .. code-block:: javascript
 
-<<<<<<< 3699a0af5c53a1ba4f8fd030421e4f976368b404
         _converse.listen.not('message', function (messageXML) { ... });
-=======
-        converse.listen.not('message', function (messageXML) { ... });
->>>>>>> Replace jQuery-based event emitter with Backbone.Events
-

+ 0 - 2
spec/converse.js

@@ -239,11 +239,9 @@
                 // Test on chat that doesn't exist.
                 expect(_converse.api.chats.get('non-existing@jabber.org')).toBeFalsy();
                 var jid = mock.cur_names[0].replace(/ /g,'.').toLowerCase() + '@localhost';
-
                 // Test on chat that's not open
                 var box = _converse.api.chats.get(jid);
                 expect(typeof box === 'undefined').toBeTruthy();
-
                 var chatboxview = _converse.chatboxviews.get(jid);
                 // Test for single JID
                 test_utils.openChatBoxFor(_converse, jid);

+ 1 - 3
spec/disco.js

@@ -9,9 +9,7 @@
     var Strophe = converse.env.Strophe;
 
     describe("Service Discovery", function () {
-
-        describe("Whenever _converse.js discovers a new server feature", function () {
-
+        describe("Whenever converse.js discovers a new server feature", function () {
            it("emits the serviceDiscovered event", mock.initConverse(function (_converse) {
                 spyOn(_converse, 'emit');
                 _converse.features.create({'var': Strophe.NS.MAM});