Skip to content

Commit

Permalink
Treat read receipt errors as non-fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Apr 3, 2023
1 parent b42a3cf commit 9023c78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mjolnir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ export class Mjolnir {
event['content']['body'] = COMMAND_PREFIX + restOfBody;
LogService.info("Mjolnir", `Command being run by ${event['sender']}: ${event['content']['body']}`);

await client.sendReadReceipt(roomId, event['event_id']);
client.sendReadReceipt(roomId, event['event_id']).catch((e: any) => {
LogService.warn("Mjolnir", "Error sending read receipt: ", e);
});
return handleCommand(roomId, event, this);
}
});
Expand Down

0 comments on commit 9023c78

Please sign in to comment.