Skip to content

Commit

Permalink
megadl: get message only if user is qualified
Browse files Browse the repository at this point in the history
  • Loading branch information
Itz-fork committed Jan 2, 2024
1 parent 0dad204 commit 2e8e6aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion megadl/modules/mega_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from os import path, makedirs

from pyrogram import filters
from pyrogram.enums import ChatType
from pyrogram.types import (
Message,
CallbackQuery,
Expand Down
3 changes: 2 additions & 1 deletion megadl/modules/mega_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ async def to_up_cb(client: CypherClient, query: CallbackQuery):
qmid = query.message.id
qcid = query.message.chat.id
qusr = query.from_user.id
msg = await client.get_messages(qcid, _mid)

# weird workaround to add support for private mode
conf = None
Expand All @@ -68,6 +67,8 @@ async def to_up_cb(client: CypherClient, query: CallbackQuery):
if udoc:
conf = f"--username {client.cipher.decrypt(udoc['email']).decode()} --password {client.cipher.decrypt(udoc['password']).decode()}"

# Get message
msg = await client.get_messages(qcid, _mid)
strtim = time()
# Status msg
await query.edit_message_text("`Trying to download the file 📥`", reply_markup=None)
Expand Down

0 comments on commit 2e8e6aa

Please sign in to comment.