support creating @room pills in partcreator
This commit is contained in:
parent
eb4ff50c3c
commit
dfec5058c5
1 changed files with 11 additions and 0 deletions
|
@ -260,6 +260,13 @@ class RoomPillPart extends PillPart {
|
|||
}
|
||||
}
|
||||
|
||||
class AtRoomPillPart extends RoomPillPart {
|
||||
get type() {
|
||||
return "at-room-pill";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class UserPillPart extends PillPart {
|
||||
constructor(userId, displayName, member) {
|
||||
super(userId, displayName);
|
||||
|
@ -402,6 +409,10 @@ export class PartCreator {
|
|||
return new RoomPillPart(alias, room);
|
||||
}
|
||||
|
||||
atRoomPill(text) {
|
||||
return new AtRoomPillPart(text, this._room);
|
||||
}
|
||||
|
||||
userPill(displayName, userId) {
|
||||
const member = this._room.getMember(userId);
|
||||
return new UserPillPart(userId, displayName, member);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue