From 5d7e414bcd5dd5f4787fcc97656263ebe74ecd08 Mon Sep 17 00:00:00 2001 From: mrmissx Date: Fri, 15 Dec 2023 00:24:13 +0700 Subject: [PATCH] fix(federation): chat object passed to db --- anjani/plugins/federation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anjani/plugins/federation.py b/anjani/plugins/federation.py index bf8fbe529..a7a60585c 100644 --- a/anjani/plugins/federation.py +++ b/anjani/plugins/federation.py @@ -779,7 +779,7 @@ async def cmd_fban( for key, err_msg in failed.items(): text += f"failed to fban on chat {key} caused by {err_msg}\n\n" # Remove the chat federation - await self.db.update_one({"_id": data["_id"]}, {"$pull": {"chats": chat}}) + await self.db.update_one({"_id": data["_id"]}, {"$pull": {"chats": chat.id}}) text += f"**Those chat has leaved the federation {data['name']}!**" await ctx.respond(text, mode="reply", reference=ctx.response)