Skip to content

Commit

Permalink
fix unpin
Browse files Browse the repository at this point in the history
  • Loading branch information
skar404 committed Jun 29, 2023
1 parent 29f8e9c commit 8fc00c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ async def inline_query(client, query):

pin = await PinMessage.query \
.where(PinMessage.chat_id == query.message.chat.id) \
.where(PinMessage.message_id == query.message.reply_to_message.id).gino.first()
.where(PinMessage.message_id.in_([
query.message.reply_to_message.id,
query.message.reply_to_message.pinned_message.id,
])).gino.first()

if data in ('infinitely', 'ok'):
if data == 'infinitely':
Expand Down

0 comments on commit 8fc00c6

Please sign in to comment.