Bladeren bron

Throws an exception when strophe plugins are missing.

tags/v0.0.2
damencho 9 jaren geleden
bovenliggende
commit
0e49f7b92f
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4
    0
      modules/xmpp/xmpp.js

+ 4
- 0
modules/xmpp/xmpp.js Bestand weergeven

48
 
48
 
49
     this.connection = createConnection(options.bosh, token);
49
     this.connection = createConnection(options.bosh, token);
50
 
50
 
51
+    if(!this.connection.disco || !this.connection.caps)
52
+        throw new Error(
53
+            "Missing strophe-plugins (disco and caps plugins are required)!");
54
+
51
     // Initialize features advertised in disco-info
55
     // Initialize features advertised in disco-info
52
     this.initFeaturesList();
56
     this.initFeaturesList();
53
 
57
 

Laden…
Annuleren
Opslaan