dev@locazia: fix
This commit is contained in:
1 parent
ecd8c48352
commit
181fded171
2 files changed
+26
-13
No files matched your search
@@ -1,4 +1,4 @@
|
||||
|
||||
import base58
|
||||
from aiogram import types, Router, F
|
||||
|
||||
from app.core._config import WEB_APP_URLS
|
||||
@@ -54,5 +54,16 @@ async def t_callback_owned_content(query: types.CallbackQuery, memory=None, user
|
||||
)
|
||||
|
||||
|
||||
router.callback_query.register(t_callback_owned_content, F.data == 'ownedContent')
|
||||
async def t_callback_node_content(query: types.CallbackQuery, memory=None, user=None, db_session=None, chat_wrap=None, **extra):
|
||||
content_hash = query.data.split('_')[1]
|
||||
return await chat_wrap.send_player(
|
||||
db_session.query(StoredContent).filter_by(
|
||||
hash=base58.b58encode(bytes.fromhex(content_hash)).decode()
|
||||
).first(),
|
||||
message_id=query.message.message_id
|
||||
)
|
||||
|
||||
|
||||
|
||||
router.callback_query.register(t_callback_owned_content, F.data == 'ownedContent')
|
||||
router.callback_query.register(t_callback_node_content, F.data.startswith('NC_'))
|
||||
Reference in new issue
Block a user