From 472b8fe993fdff246d082e91d33e0a9870985a1e Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 7 Jul 2019 02:48:28 -0400 Subject: [PATCH] Fix "joined room" event shown as "declined invite" --- src/python/matrix_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index f672267c..b0021283 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -289,12 +289,14 @@ class MatrixClient(nio.AsyncClient): reason = f" Reason: {now['reason']}" if now.get("reason") else "" if membership == "join": - did = "accepted" if prev and prev_membership == "invite" else \ - "declined" - return f"%S {did} their invitation." + return ( + "%S accepted their invitation." + if prev and prev_membership == "invite" else + "%S joined the room." + ) if membership == "invite": - return f"%S invited %T to the room." + return "%S invited %T to the room." if membership == "leave": if ev.state_key == ev.sender: