Fix "joined room" event shown as "declined invite"
This commit is contained in:
parent
a47e6b5c07
commit
472b8fe993
|
@ -289,12 +289,14 @@ class MatrixClient(nio.AsyncClient):
|
||||||
reason = f" Reason: {now['reason']}" if now.get("reason") else ""
|
reason = f" Reason: {now['reason']}" if now.get("reason") else ""
|
||||||
|
|
||||||
if membership == "join":
|
if membership == "join":
|
||||||
did = "accepted" if prev and prev_membership == "invite" else \
|
return (
|
||||||
"declined"
|
"%S accepted their invitation."
|
||||||
return f"%S {did} their invitation."
|
if prev and prev_membership == "invite" else
|
||||||
|
"%S joined the room."
|
||||||
|
)
|
||||||
|
|
||||||
if membership == "invite":
|
if membership == "invite":
|
||||||
return f"%S invited %T to the room."
|
return "%S invited %T to the room."
|
||||||
|
|
||||||
if membership == "leave":
|
if membership == "leave":
|
||||||
if ev.state_key == ev.sender:
|
if ev.state_key == ev.sender:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user