From 08264b9e75ac9ef851aa495d54b54c68bf2c6bdb Mon Sep 17 00:00:00 2001 From: HgO Date: Mon, 12 Aug 2024 13:24:47 +0200 Subject: [PATCH] find dm room with only bot and user in it --- matrix_alertbot/matrix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix_alertbot/matrix.py b/matrix_alertbot/matrix.py index 8112201..4b6da27 100644 --- a/matrix_alertbot/matrix.py +++ b/matrix_alertbot/matrix.py @@ -206,6 +206,9 @@ class MatrixClientPool: f"Bot {account.id} | Found {len(room_members)} room members in {room_id}" ) + if len(room_members) > len(self._matrix_clients) + 1: + continue + all_accounts_in_room = True for user_id in unactive_user_ids: if user_id not in room_members: