Fix varaibles in fedi preview
This commit is contained in:
parent
497a8dc2b7
commit
24d2ce2dcc
1 changed files with 3 additions and 3 deletions
|
@ -17,9 +17,9 @@ class FediversePreviewModule(niobot.Module):
|
|||
|
||||
@niobot.event("message")
|
||||
async def on_message(self, room: niobot.MatrixRoom, event: niobot.RoomMessage):
|
||||
supported_prefixes = self.bot.cfg.get("fediverse_preview")
|
||||
supported_prefixes = supported_prefixes.get("urls", ["https://fedi.transgender.ing"])
|
||||
ignore = supported_prefixes.get("ignore", [])
|
||||
config = self.bot.cfg.get("fediverse_preview")
|
||||
supported_prefixes = config.get("urls", ["https://fedi.transgender.ing"])
|
||||
ignore = config.get("ignore", [])
|
||||
if not isinstance(event, niobot.RoomMessageText):
|
||||
return
|
||||
if event.sender in ignore or room.room_id in ignore or event.sender == self.bot.user_id:
|
||||
|
|
Loading…
Reference in a new issue