Skip to content

Commit

Permalink
shorten
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Jan 20, 2025
1 parent aa86940 commit 9a2fb36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Mjolnir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ export class Mjolnir {

matrixEmitter.on("room.message", async (roomId, event) => {
const eventContent = event.content;
const eventId = event.event_id;
const sender = event.sender;
if (typeof eventContent !== "object") return;

const { event_id: eventId, sender } = event;
const { msgtype, body: originalBody } = eventContent;

if (msgtype !== "m.text" || typeof originalBody !== "string") {
Expand Down

0 comments on commit 9a2fb36

Please sign in to comment.