buttons etc
This commit is contained in:
parent
18cf8f9954
commit
d9cd30ae33
|
|
@ -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()}"
|
||||
}],
|
||||
[{
|
||||
|
|
|
|||
|
|
@ -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([{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue