Pergunta

Em ejabberd.cfg eu tenho o seguinte

{host_config, "thisislove-MacBook-2.local", [{auth_method, [internal, anonymous]},
                          {allow_multiple_connections, false},
                          {anonymous_protocol, both}]}.

Mas ao usar o Speeqe JavaScript Client (speeqe.com) para se conectar, vejo que ele envia

<body rid='1366284187' xmlns='http://jabber.org/protocol/httpbind' to='thisislove-macbook-2.local' xml:lang='en' wait='60' hold='1' window='5' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

e o servidor responde com

<body xmlns='http://jabber.org/protocol/httpbind' sid='f89bf034b02fa6b884bb0c55be3f1f69e45e3866' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='thisislove-macbook-2.local' secure='true' authid='353072658' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features></body>

Observe os mecanismos, Digest-Md5 & Plain. Se não me engano, deve ter anônimo como mecanismo também. Então, o que acontece é que o Speeqe simplesmente encerra a conexão.

Como tal, estou pensando que devo estar perdendo alguma coisa na configuração anônima ou na configuração do MUC. Na configg mod_muc, eu tenho

{mod_muc,      [
      %%{host, "conference.@HOST@"},
      {access, muc},
      {access_create, muc},
      {access_persistent, muc},
      {access_admin, muc_admin},
      {max_room_name, 190},
      {max_room_desc, 190},
      {max_users, 500}
     ]}

Então, o que estou perdendo?

Obrigado

Foi útil?

Solução

Isso pode ajudar alguém no futuro, então aqui está o que estava acontecendo. Eu tive

{auth_method, internal}. 

ao invés de

{auth_method, [internal, anonymous]}.

Eu também tinha

{access, muc_create, [{allow, local}]}.

ao invés de

{access, muc_create, [{allow, all}]}.

E, finalmente, o nome da sala em local_settings.js de speeqe também precisava ter o servidor de bate -papo: alpha@conference.domain.com (e não alpha@domain.com).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top