Implement broadcast message preview (#9762)

This commit is contained in:
Michael Weimann 2022-12-16 12:01:16 +01:00 committed by GitHub
parent 6205c70462
commit 51554399fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 353 additions and 32 deletions

View file

@ -45,10 +45,7 @@ import RightPanelStore from "./stores/right-panel/RightPanelStore";
import { highlightEvent, isLocationEvent } from "./utils/EventUtils";
import { ElementCall } from "./models/Call";
import { textForVoiceBroadcastStoppedEvent, VoiceBroadcastInfoEventType } from "./voice-broadcast";
export function getSenderName(event: MatrixEvent): string {
return event.sender?.name ?? event.getSender() ?? _t("Someone");
}
import { getSenderName } from "./utils/event/getSenderName";
function getRoomMemberDisplayname(event: MatrixEvent, userId = event.getSender()): string {
const client = MatrixClientPeg.get();