Converse converse.js

Namespace: ChatRoomOccupants

_converse.ChatRoomOccupants

A list of _converse.ChatRoomOccupant instances, representing participants in a MUC.

Source:

Methods

findOccupant(data)

Try to find an existing occupant based on the passed in data object.

Fetching the user by occupant_id is the quickest, O(1), since it's a dictionary lookup.

Fetching by jid or nick is O(n), since it requires traversing an array.

Lookup by occupant_id is done first, then jid, and then nick.

Parameters:
Name Type Description
data OccupantData
Source:

findOccupant(data)

Try to find an existing occupant based on the passed in data object.

Fetching the user by occupant_id is the quickest, O(1), since it's a dictionary lookup.

Fetching by jid or nick is O(n), since it requires traversing an array.

Lookup by occupant_id is done first, then jid, and then nick.

Parameters:
Name Type Description
data OccupantData
Source:

getOwnOccupant() → {_converse.ChatRoomOccupant}

Get the _converse.ChatRoomOccupant instance which represents the current user.

Source:
Returns:
Type
_converse.ChatRoomOccupant

getOwnOccupant() → {_converse.ChatRoomOccupant}

Get the _converse.ChatRoomOccupant instance which represents the current user.

Source:
Returns:
Type
_converse.ChatRoomOccupant

_converse.ChatRoomOccupants

A list of _converse.ChatRoomOccupant instances, representing participants in a MUC.

Source:

Methods

findOccupant(data)

Try to find an existing occupant based on the passed in data object.

Fetching the user by occupant_id is the quickest, O(1), since it's a dictionary lookup.

Fetching by jid or nick is O(n), since it requires traversing an array.

Lookup by occupant_id is done first, then jid, and then nick.

Parameters:
Name Type Description
data OccupantData
Source:

findOccupant(data)

Try to find an existing occupant based on the passed in data object.

Fetching the user by occupant_id is the quickest, O(1), since it's a dictionary lookup.

Fetching by jid or nick is O(n), since it requires traversing an array.

Lookup by occupant_id is done first, then jid, and then nick.

Parameters:
Name Type Description
data OccupantData
Source:

getOwnOccupant() → {_converse.ChatRoomOccupant}

Get the _converse.ChatRoomOccupant instance which represents the current user.

Source:
Returns:
Type
_converse.ChatRoomOccupant

getOwnOccupant() → {_converse.ChatRoomOccupant}

Get the _converse.ChatRoomOccupant instance which represents the current user.

Source:
Returns:
Type
_converse.ChatRoomOccupant