mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-24 18:59:17 +00:00
Add isVoiceMessage()
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -139,3 +139,12 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
|
||||
|
||||
return { tileHandler, isInfoMessage, isBubbleMessage };
|
||||
}
|
||||
|
||||
export function isVoiceMessage(mxEvent: MatrixEvent): boolean {
|
||||
const content = mxEvent.getContent();
|
||||
// MSC2516 is a legacy identifier. See https://github.com/matrix-org/matrix-doc/pull/3245
|
||||
return (
|
||||
!!content['org.matrix.msc2516.voice'] ||
|
||||
!!content['org.matrix.msc3245.voice']
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user