Skip to content

Commit

Permalink
fix #1143
Browse files Browse the repository at this point in the history
  • Loading branch information
OasisAkari committed Mar 19, 2024
1 parent 039bb4c commit e093610
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bots/aiogram/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ async def send_message(self, message_chain, quote=True, disable_secret_check=Fal

async def check_native_permission(self):
if not self.session.message:
chat = await dp.bot.get_chat(self.session.target)
chat = await bot.get_chat(self.session.target)
else:
chat = self.session.message.chat
if chat.type == 'private':
return True
admins = [member.user.id for member in await dp.bot.get_chat_administrators(chat.id)]
admins = [member.user.id for member in await bot.get_chat_administrators(chat.id)]
if self.session.sender in admins:
return True
return False
Expand Down

0 comments on commit e093610

Please sign in to comment.