This commit is contained in:
user 2024-04-05 19:07:03 +03:00
parent 2f188c9e65
commit 227d08ea11
2 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,10 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
title=title, title=title,
performer=performer, performer=performer,
reply_markup=get_inline_keyboard([ reply_markup=get_inline_keyboard([
[{
'text': user.translated('shareTrack_button'),
'switch_inline_query': f"C{content.cid.serialize_v2()}"
}],
[{ [{
'text': user.translated('viewTrack_button'), 'text': user.translated('viewTrack_button'),
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}" 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}"

View File

@ -101,6 +101,7 @@ class PlayerTemplates:
'callback_data': f'PC_{content.id}' 'callback_data': f'PC_{content.id}'
}]) }])
template_kwargs['audio'] = URLInputFile(local_content_url + '?seconds_limit=30') template_kwargs['audio'] = URLInputFile(local_content_url + '?seconds_limit=30')
text = self.user.translated('p_playerContext_preview')
make_log("TG-Player", f"Send content {content_type} ({content_encoding}) to chat {self._chat_id}. {cd_log}") make_log("TG-Player", f"Send content {content_type} ({content_encoding}) to chat {self._chat_id}. {cd_log}")
for kmsg in self.db_session.query(KnownTelegramMessage).filter_by( for kmsg in self.db_session.query(KnownTelegramMessage).filter_by(