Skip to content

Commit

Permalink
be idomatic
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Ralston <[email protected]>
  • Loading branch information
H-Shay and turt2live committed Jul 29, 2024
1 parent bde03c2 commit 4804205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protections/MessageIsMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 4804205

Please sign in to comment.