Skip to content

Commit

Permalink
Don't delete all bot message with our main account
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Apr 4, 2024
1 parent 2443e46 commit dd11c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SlackEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class SlackEventHandler extends BaseSlackHandler {
log.error("Cannot delete message with no previous_message:", msg);
return;
}
if (previousMessage.subtype === 'bot_message') {
if (previousMessage.subtype === 'bot_message' && (previousMessage.bot_id === team.bot_id)) {
// Sent from Matrix, try to remove it with our bot account
try {
const botClient = this.main.botIntent.matrixClient;
Expand Down

0 comments on commit dd11c2a

Please sign in to comment.