From 913e566f5e02d547b2d92c1e1f0149351821d8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Tue, 14 Mar 2023 15:13:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20incorrect=20paramete?= =?UTF-8?q?r=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/admin/post.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/admin/post.py b/plugins/admin/post.py index b0060be6..1eb14af5 100644 --- a/plugins/admin/post.py +++ b/plugins/admin/post.py @@ -277,7 +277,7 @@ class Post(Plugin.Conversation): channel_id = -1 try: for channel_chat_id in config.channels: - chat = await self.get_chat(chat_id=channel_id) + chat = await self.get_chat(chat_id=channel_chat_id) if message.text == chat.username: channel_id = channel_chat_id except KeyError as exc: @@ -339,7 +339,7 @@ class Post(Plugin.Conversation): channel_name = None try: for channel_info in config.channels: - if post_handler_data.channel_id == channel_info.chat_id: + if post_handler_data.channel_id == channel_info: chat = await self.get_chat(chat_id=channel_id) channel_name = chat.username except KeyError as exc: