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")
|
@niobot.event("message")
|
||||||
async def on_message(self, room: niobot.MatrixRoom, event: niobot.RoomMessage):
|
async def on_message(self, room: niobot.MatrixRoom, event: niobot.RoomMessage):
|
||||||
supported_prefixes = self.bot.cfg.get("fediverse_preview")
|
config = self.bot.cfg.get("fediverse_preview")
|
||||||
supported_prefixes = supported_prefixes.get("urls", ["https://fedi.transgender.ing"])
|
supported_prefixes = config.get("urls", ["https://fedi.transgender.ing"])
|
||||||
ignore = supported_prefixes.get("ignore", [])
|
ignore = config.get("ignore", [])
|
||||||
if not isinstance(event, niobot.RoomMessageText):
|
if not isinstance(event, niobot.RoomMessageText):
|
||||||
return
|
return
|
||||||
if event.sender in ignore or room.room_id in ignore or event.sender == self.bot.user_id:
|
if event.sender in ignore or room.room_id in ignore or event.sender == self.bot.user_id:
|
||||||
|
|
Loading…
Reference in a new issue