Implements Multi-User Chat (XEP-0045).
- Source:
Members
(static) conn
strophe connection
- Source:
(static) CONST
some constants
- Source:
(static) helper :Object
Some helper functions.
Type:
- Object
- Source:
(static) onStatus
Handle status codes. Every function gets room jid, nickname, member data and xdata.
- Source:
Methods
(static) close(room)
Close the given room.
Parameters:
Name | Type | Description |
---|---|---|
room |
Room jid |
- Source:
(static) destroy(room, handler_cb, error_cb)
Destroy the given room.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
handler_cb |
function | Function to handle the successful destruction |
error_cb |
function | Function to handle an error |
- Source:
(static) emptyMembers(room)
Empty member list.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
- Source:
(static) initMenu()
Add entry to menu.
- Source:
(static) insertMember(room, nickname, memberdata)
Insert member to room member list.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
nickname |
string | Nickname |
memberdata |
string | Member data |
- Source:
(static) join(room, nickname, passwordopt, roomNameopt, subjectopt)
Join the given room.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
room |
string | Room jid | |
nickname |
string | Desired nickname | |
password |
string |
<optional> |
Password |
roomName |
string |
<optional> |
Room alias |
subject |
string |
<optional> |
Current subject |
- Source:
(static) leave(room)
Leave given room.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
- Source:
(static) onPresenceError(event, from, presence) → {Boolean}
Handle group chat presence errors.
Parameters:
Name | Type | Description |
---|---|---|
event |
||
from |
string | Jid |
presence |
string | Presence stanza |
- Source:
Returns:
Returns true on success
- Type
- Boolean
(static) postReason(room, xdata)
Extract reason from xdata and if available post it to room.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
xdata |
jQuery | Xdata |
- Source:
(static) removeMember(room, nickname)
Remove member from room member list.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
nickname |
string | Nickname |
- Source:
(static) scrollMemberListBy(room, offset)
Scroll or update member list position.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | Room jid |
offset |
integer | =0: update position; >0: Scroll to left; <0: Scroll to right |
- Source:
(static) showJoinChat(ropt, popt)
Open join dialog.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
r |
string |
<optional> |
room jid |
p |
string |
<optional> |
room password |
- Source:
(static) showRoomConfiguration(room)
Request and show room configuration.
Parameters:
Name | Type | Description |
---|---|---|
room |
string | room jid |
- Source: