fix middleware
This commit is contained in:
parent
45af09da0d
commit
10cb581b34
|
|
@ -9,7 +9,7 @@ from datetime import datetime
|
|||
|
||||
class UserDataMiddleware(BaseMiddleware):
|
||||
async def __call__(self, handler, event, data):
|
||||
update_body = event.message or event.callback_query or event.inline_query
|
||||
update_body = event.message or event.callback_query or event.inline_query or event.pre_checkout_query
|
||||
if not update_body:
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
|||
|
||||
content_share_link = {
|
||||
'text': user.translated('p_shareLinkContext').format(title=' – '.join(audio_title)),
|
||||
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}"
|
||||
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp=C{content.cid.serialize_v2()}"
|
||||
}
|
||||
|
||||
# Create inline query result using decrypted content's file_id
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ closing_router = Router()
|
|||
|
||||
@closing_router.message()
|
||||
async def t_index(message: types.Message, **extra):
|
||||
if message.write_access_allowed:
|
||||
return
|
||||
|
||||
return await message.answer(extra['user'].translated('error_unknownCommand'), parse_mode='html')
|
||||
|
||||
main_router.include_routers(closing_router)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class PlayerTemplates:
|
|||
|
||||
content_share_link = {
|
||||
'text': self.user.translated('p_shareLinkContext').format(title=content_metadata_json.get('name', "")),
|
||||
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}"
|
||||
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp=C{content.cid.serialize_v2()}"
|
||||
}
|
||||
|
||||
preview_content = db_session.query(StoredContent).filter(
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -126,10 +126,10 @@ msgstr ""
|
|||
#: app/core/models/_telegram/templates/player.py:74
|
||||
#: app/client_bot/routers/content.py:129
|
||||
msgid "shareTrack_button"
|
||||
msgstr "🎶 Поделиться треком"
|
||||
msgstr "🎶 Поделиться"
|
||||
|
||||
msgid "shareVideo_button"
|
||||
msgstr "🎬 Поделиться видео"
|
||||
msgstr "🎬 Поделиться"
|
||||
|
||||
#: app/core/models/_telegram/templates/player.py:79
|
||||
msgid "viewTrackAsClient_button"
|
||||
|
|
@ -190,7 +190,7 @@ msgstr ""
|
|||
|
||||
|
||||
msgid "shareLink_button"
|
||||
msgstr "🔗 Поделиться ссылкой"
|
||||
msgstr "🔗 Поделиться"
|
||||
|
||||
msgid "p_shareLinkContext"
|
||||
msgstr "🎉 Наслаждайтесь {title} на MY!"
|
||||
|
|
|
|||
Loading…
Reference in New Issue