diff --git a/app/client_bot/routers/content.py b/app/client_bot/routers/content.py index 2ab9248..41fd712 100644 --- a/app/client_bot/routers/content.py +++ b/app/client_bot/routers/content.py @@ -126,6 +126,8 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use if cover_content: result_kwargs['thumb_url'] = cover_content.web_url + content_type_declared = decrypted_content_meta.get('content_type', 'application/x-binary').split('/')[0] + content_list.append( types.InlineQueryResultAudio( id=f"NC_{content.id}", @@ -137,7 +139,10 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use parse_mode='html', reply_markup=get_inline_keyboard([ [{ - 'text': user.translated('shareTrack_button'), + 'text': { + 'audio': user.translated('shareTrack_button'), + 'video': user.translated('shareVideo_button'), + }[content_type_declared], 'switch_inline_query': f"C{content.cid.serialize_v2()}" }], [{ diff --git a/app/core/models/_telegram/templates/player.py b/app/core/models/_telegram/templates/player.py index 36a998d..f99e310 100644 --- a/app/core/models/_telegram/templates/player.py +++ b/app/core/models/_telegram/templates/player.py @@ -100,7 +100,7 @@ class PlayerTemplates: if self.bot_id == 1: # Buttons for sharing and opening in app inline_keyboard_array.append([{ - 'text': self.user.translated('shareTrack_button'), + 'text': self.user.translated('shareVideo_button'), 'switch_inline_query': f"C{content.cid.serialize_v2()}", }]) inline_keyboard_array.append([{ diff --git a/locale/en/LC_MESSAGES/sanic_telegram_bot.mo b/locale/en/LC_MESSAGES/sanic_telegram_bot.mo index 1b66abd..7498fa5 100644 Binary files a/locale/en/LC_MESSAGES/sanic_telegram_bot.mo and b/locale/en/LC_MESSAGES/sanic_telegram_bot.mo differ diff --git a/locale/en/LC_MESSAGES/sanic_telegram_bot.po b/locale/en/LC_MESSAGES/sanic_telegram_bot.po index 4cf4d01..3b150c3 100644 --- a/locale/en/LC_MESSAGES/sanic_telegram_bot.po +++ b/locale/en/LC_MESSAGES/sanic_telegram_bot.po @@ -117,6 +117,9 @@ msgstr "" msgid "shareTrack_button" msgstr "Share track" +msgid "shareVideo_button" +msgstr "Share video" + #: app/core/models/_telegram/templates/player.py:79 msgid "viewTrackAsClient_button" msgstr "Open in player" @@ -150,7 +153,7 @@ msgstr "Error: content price is not set" #: app/client_bot/routers/content.py:133 msgid "viewTrack_button" -msgstr "Buy track" +msgstr "Open in mini-app" #: app/client_bot/routers/content.py:138 msgid "cancelPurchase_button"