mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
🐛 Fix the incorrect parameter passing
This commit is contained in:
parent
a9b76ac187
commit
913e566f5e
@ -277,7 +277,7 @@ class Post(Plugin.Conversation):
|
|||||||
channel_id = -1
|
channel_id = -1
|
||||||
try:
|
try:
|
||||||
for channel_chat_id in config.channels:
|
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:
|
if message.text == chat.username:
|
||||||
channel_id = channel_chat_id
|
channel_id = channel_chat_id
|
||||||
except KeyError as exc:
|
except KeyError as exc:
|
||||||
@ -339,7 +339,7 @@ class Post(Plugin.Conversation):
|
|||||||
channel_name = None
|
channel_name = None
|
||||||
try:
|
try:
|
||||||
for channel_info in config.channels:
|
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)
|
chat = await self.get_chat(chat_id=channel_id)
|
||||||
channel_name = chat.username
|
channel_name = chat.username
|
||||||
except KeyError as exc:
|
except KeyError as exc:
|
||||||
|
Loading…
Reference in New Issue
Block a user