Ignore self (how has this not caused a loop yet)

This commit is contained in:
Nexus 2024-08-12 15:53:21 +01:00
parent 9b37aedf30
commit 225862a401
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -22,7 +22,7 @@ class MisskeyPreviewModule(niobot.Module):
ignore = self.bot.cfg.get("misskey_preview", {}).get("ignore", [])
if not isinstance(event, niobot.RoomMessageText):
return
if event.sender in ignore or room.room_id in ignore:
if event.sender in ignore or room.room_id in ignore or event.sender == self.bot.user_id:
return
sent = []