You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
328 B
JavaScript
12 lines
328 B
JavaScript
import {matrix} from '@/main';
|
|
|
|
export function getUser(userId) {
|
|
return matrix.client.getUser(userId);
|
|
}
|
|
export function calcUserName(userId){
|
|
if (matrix.user === userId) return 'you';
|
|
return matrix.client.getUser(userId).displayName || userId;
|
|
}
|
|
export function getRoom(roomId){
|
|
return matrix.client.getRoom(roomId);
|
|
} |