From 175caba2e9d28ae409df54808d841d32f06e2b6b Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 2 Sep 2019 13:21:46 -0400 Subject: [PATCH] Ignore member events where prev_content == content --- src/python/matrix_client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 1f87087c..e9a9d18b 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -639,6 +639,10 @@ class MatrixClient(nio.AsyncClient): async def process_room_member_event( self, room, ev, ) -> Optional[Tuple[TypeSpecifier, str]]: + + if ev.prev_content == ev.content: + return None + prev = ev.prev_content now = ev.content membership = ev.membership @@ -718,8 +722,7 @@ class MatrixClient(nio.AsyncClient): "%1 changed their {}.".format(" and ".join(changed)), ) - log.warning("Invalid member event - %s", - json.dumps(vars(ev), indent=4)) + log.warning("Unknown member event: %s", json.dumps(vars(ev), indent=4)) return None