JSDoc: Namespace: muc

# Namespace: muc

## jsxc.muc

Implements Multi-User Chat (XEP-0045).

Source:
  - jsxc.lib.muc.js, line 1

### Members

#### (static) conn

strophe connection

Source:
  - jsxc.lib.muc.js, line 8

#### (static) CONST

some constants

Source:
  - jsxc.lib.muc.js, line 11

#### (static) helper :Object

Some helper functions.

##### Type:

- Object

Source:
  - jsxc.lib.muc.js, line 1501

#### (static) onStatus

Handle status codes. Every function gets room jid, nickname, member data and xdata.

Source:
  - jsxc.lib.muc.js, line 1012

### Methods

#### (static) close(room)

Close the given room.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` |  | Room jid

Source:
  - jsxc.lib.muc.js, line 653

#### (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:
  - jsxc.lib.muc.js, line 617

#### (static) emptyMembers(room)

Empty member list.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | Room jid

Source:
  - jsxc.lib.muc.js, line 1343

#### (static) initMenu()

Add entry to menu.

Source:
  - jsxc.lib.muc.js, line 126

#### (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:
  - jsxc.lib.muc.js, line 1256

#### (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:
  - jsxc.lib.muc.js, line 533

#### (static) leave(room)

Leave given room.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | Room jid

Source:
  - jsxc.lib.muc.js, line 562

#### (static) onPresenceError(event, from, presence) → {Boolean}

Handle group chat presence errors.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` |  |
`from` | string | Jid
`presence` | string | Presence stanza

Source:
  - jsxc.lib.muc.js, line 988

##### 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:
  - jsxc.lib.muc.js, line 1221

#### (static) removeMember(room, nickname)

Remove member from room member list.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | Room jid
`nickname` | string | Nickname

Source:
  - jsxc.lib.muc.js, line 1298

#### (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:
  - jsxc.lib.muc.js, line 1314

#### (static) showJoinChat(ropt, popt)

Open join dialog.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`r` | string | <optional> | room jid
`p` | string | <optional> | room password

Source:
  - jsxc.lib.muc.js, line 149

#### (static) showRoomConfiguration(room)

Request and show room configuration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | room jid

Source:
  - jsxc.lib.muc.js, line 445