Add an easy way to ignore users for the misskey preview
This commit is contained in:
parent
a090e780f2
commit
9b37aedf30
1 changed files with 3 additions and 0 deletions
|
@ -19,8 +19,11 @@ class MisskeyPreviewModule(niobot.Module):
|
|||
async def on_message(self, room: niobot.MatrixRoom, event: niobot.RoomMessage):
|
||||
supported_prefixes = self.bot.cfg.get("misskey_preview", {})
|
||||
supported_prefixes = supported_prefixes.get("urls", ["https://fedi.transgender.ing"])
|
||||
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:
|
||||
return
|
||||
|
||||
sent = []
|
||||
async with httpx.AsyncClient(
|
||||
|
|
Loading…
Reference in a new issue