Class: MatrixUser

MatrixUser(userId, dataopt)

new MatrixUser(userId, dataopt)

Construct a Matrix user.
Parameters:
Name Type Attributes Description
userId string The user_id of the user.
data Object <optional>
Serialized data values
Source:

Methods

get(key) → {*}

Get the data value for the given key.
Parameters:
Name Type Description
key string An arbitrary bridge-specific key.
Source:
Returns:
Stored data for this key. May be undefined.
Type
*

getDisplayName() → (nullable) {string}

Get the display name for this Matrix user.
Source:
Returns:
The display name.
Type
string

getId() → {string}

Get the matrix user's ID.
Source:
Returns:
The user ID
Type
string

serialize() → {Object}

Serialize all the data about this user, excluding the user ID.
Source:
Returns:
The serialised data
Type
Object

set(key, val)

Set an arbitrary bridge-specific data value for this user.
Parameters:
Name Type Description
key string The key to store the data value under.
val * The data value. This value should be serializable via JSON.stringify(data).
Source:

setDisplayName(name)

Set the display name for this Matrix user.
Parameters:
Name Type Description
name string The Matrix display name.
Source: