Classes
Members
Methods
# async static forRoom(roomIdOrAlias, client) → {Promise.<MentionPill>}
Creates a new mention for a room (not @room, but the room itself to be linked).
Parameters:
Name | Type | Description |
---|---|---|
roomIdOrAlias |
string
|
The room ID or alias to mention. |
client |
MatrixClient
|
Optional client for creating a more pleasing mention. |
Resolves to the room's mention.
Promise.<MentionPill>
# async static forUser(userId, inRoomId, client) → {Promise.<MentionPill>}
Creates a new mention for a user in an optional room.
Parameters:
Name | Type | Description |
---|---|---|
userId |
string
|
The user ID the mention is for. |
inRoomId |
String
|
Optional room ID the user is being mentioned in, for the aesthetics of the mention. |
client |
MatrixClient
|
Optional client for creating a more pleasing mention. |
Resolves to the user's mention.
Promise.<MentionPill>
# static withDisplayName(userId, displayName) → {MentionPill}
Creates a mention from static information.
Parameters:
Name | Type | Description |
---|---|---|
userId |
string
|
The user ID the mention is for. |
displayName |
string
|
The user's display name. |
The mention for the user.