Add jid
method to converse API, to retrieve the user's JID.
This commit is contained in:
parent
dd5c3c7a38
commit
c243aba98f
|
@ -400,6 +400,16 @@ The "user" grouping
|
|||
|
||||
This grouping collects API functions related to the current logged in user.
|
||||
|
||||
jid
|
||||
~~~
|
||||
|
||||
Return's the current user's full JID (Jabber ID).
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
converse.user.jid()
|
||||
// Returns for example jc@opkode.com/conversejs-351236
|
||||
|
||||
login
|
||||
~~~~~
|
||||
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
},
|
||||
},
|
||||
'user': {
|
||||
'jid': function () {
|
||||
return converse.connection.jid;
|
||||
},
|
||||
'login': function (credentials) {
|
||||
converse.initConnection();
|
||||
converse.logIn(credentials);
|
||||
|
|
Loading…
Reference in New Issue
Block a user