Namespace: muc

jsxc. muc

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

<private, static> _showRoomConfiguration(room, config)

Show room configuration.
Parameters:
Name Type Description
room string room jid
config Strophe.x.Form current room config as Form object
Source:

<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:

<private, static> init(o)

Initialize muc plugin.
Parameters:
Name Type Description
o object Options
Source:

<static> initMenu()

Add entry to menu.
Source:

<private, static> initWindow(event, win)

Init group chat window.
Parameters:
Name Type Description
event Event
win jQuery Window object
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, password, roomName, subject)

Join the given room.
Parameters:
Name Type Argument 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:

<private, static> onAddRoster(event, room, data, bud)

Prepare group chat roster item.
Parameters:
Name Type Description
event
room string Room jid
data object Room data
bud jQuery Roster item
Source:

<private, static> onErrorMessage(message)

Handle group chat error message.
Parameters:
Name Type Description
message string Message stanza
Source:

<private, static> onExited(room)

Clean up after we exited a room.
Parameters:
Name Type Description
room string Room jid
Source:

<private, static> onGroupchatMessage(message) → {boolean}

Handle incoming group chat message.
Parameters:
Name Type Description
message string Message stanza
Source:
Returns:
True on success
Type
boolean

<private, static> onPresence(event, from, status, presence)

Triggered on incoming presence stanzas.
Parameters:
Name Type Description
event
from string Jid
status integer Online status between 0 and 5
presence string Presence stanza
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(r, p)

Open join dialog.
Parameters:
Name Type Argument 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: