XMPP multiple sessions of the same user issue

前端 未结 4 1666
野的像风
野的像风 2021-02-05 20:19

I\'ve implemented a chrome extension which allow to use XMPP chat over BOSH connection with punjab server running on a remote server. It is implemented using javascript Strophe

4条回答
  •  野性不改
    2021-02-05 20:40

    Make a long story short!

    Use:

    mXmppConnection.login (USERNAME, PASSWORD, StationName/NickName);
    

    And not:

    mXmppConnection.login (USERNAME, PASSWORD);
    

    The last parameter called resource, and represents your station that you login from.

    That way you can login with the same username, but still from 2 devices.

提交回复
热议问题