mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
be idomatic
Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
parent
bde03c2a75
commit
480420590c
@ -37,7 +37,7 @@ export class MessageIsMedia extends Protection {
|
||||
if (event['type'] === 'm.room.message') {
|
||||
let content = event['content'] || {};
|
||||
const relation = content["m.relates_to"]
|
||||
if (relation && relation["rel_type"] === "m.replace") {
|
||||
if (relation?.["rel_type"] === "m.replace") {
|
||||
content = content?.["m.new_content"] ?? content;
|
||||
}
|
||||
const msgtype = content['msgtype'] || 'm.text';
|
||||
|
Loading…
Reference in New Issue
Block a user