add verification request tile + styling
This commit is contained in:
parent
5c9e80a0ba
commit
0d2f9c4215
6 changed files with 279 additions and 0 deletions
|
@ -151,3 +151,20 @@ export default class KeyVerificationStateObserver {
|
|||
this.otherPartyUserId = fromUserId === this._client.getUserId() ? toUserId : fromUserId;
|
||||
}
|
||||
}
|
||||
|
||||
export function getNameForEventRoom(userId, mxEvent) {
|
||||
const roomId = mxEvent.getRoomId();
|
||||
const client = MatrixClientPeg.get();
|
||||
const room = client.getRoom(roomId);
|
||||
const member = room.getMember(userId);
|
||||
return member ? member.name : userId;
|
||||
}
|
||||
|
||||
export function userLabelForEventRoom(userId, mxEvent) {
|
||||
const name = getNameForEventRoom(userId, mxEvent);
|
||||
if (name !== userId) {
|
||||
return _t("%(name)s (%(userId)s)", {name, userId});
|
||||
} else {
|
||||
return userId;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue