From 13f48f9d8c2d7b2031e1ac2c77a67cad177c4ee8 Mon Sep 17 00:00:00 2001 From: lub Date: Sun, 3 May 2020 19:56:42 +0200 Subject: [PATCH] dont spam the admin room with all updates --- scrape.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scrape.py b/scrape.py index aa27798..3fec691 100644 --- a/scrape.py +++ b/scrape.py @@ -146,9 +146,11 @@ async def main(): 'formatted_body': get_formatted_body(post) } for room_id in matrix[mxid].rooms: - await matrix[mxid].room_send(room_id=room_id, - message_type='m.room.message', - content=content) + if room_id != admin_room: + # don't send updates to the admin room + await matrix[mxid].room_send(room_id=room_id, + message_type='m.room.message', + content=content) else: # no accesstoken for the calculated mxid content = {