瀏覽代碼

Update initialization settings

to make sense within the context of anonymous chat.
JC Brand 9 年之前
父節點
當前提交
e0215c997d
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      demo/anonymous.html

+ 9 - 1
demo/anonymous.html

@@ -55,6 +55,11 @@
 <script>
     require(['converse'], function (converse) {
         converse.initialize({
+            allow_muc_invitations: false, // Doesn't make sense to allow because only
+                                          // roster contacts can be invited
+            allow_contact_requests: false, // Contacts from other servers cannot,
+                                           // be added and anonymous users don't
+                                           // know one another's JIDs, so disabling.
             authentication: 'anonymous',
             auto_login: true,
             auto_join_rooms: [
@@ -64,8 +69,11 @@
                 'anonymous@conference.nomnom.im',
             ],
             bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
-            jid: 'nomnom.im',
+            jid: 'nomnom.im', // XMPP server which allows anonymous login (doesn't
+                              // allow chatting with other XMPP servers).
             keepalive: true,
+            hide_muc_server: true, // Federation is disabled, so no use in
+                                   // showing the MUC server.
             play_sounds: true,
             show_controlbox_by_default: true,
             strict_plugin_dependencies: false,