fix
This commit is contained in:
1 parent
c90ce0fc70
commit
c485bd27e3
6 files changed
+86
-9
No files matched your search
@@ -2,7 +2,7 @@ from app.core.models.node_storage import StoredContent
|
||||
from app.core.models.content.user_content import UserContent
|
||||
from app.core.logger import make_log
|
||||
from app.core._utils.tg_process_template import tg_process_template
|
||||
from app.core._config import PROJECT_HOST
|
||||
from app.core._config import PROJECT_HOST, CLIENT_TELEGRAM_BOT_USERNAME
|
||||
from app.core._keyboards import get_inline_keyboard
|
||||
from aiogram.types import URLInputFile
|
||||
import json
|
||||
@@ -66,6 +66,16 @@ class PlayerTemplates:
|
||||
if cover_content:
|
||||
template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url)
|
||||
|
||||
if self.bot_id == 1:
|
||||
inline_keyboard_array.append([{
|
||||
'text': self.user.translated('shareTrack_button'),
|
||||
'switch_inline_query': f"C{content.cid.serialize_v2()}"
|
||||
}])
|
||||
else:
|
||||
inline_keyboard_array.append([{
|
||||
'text': self.user.translated('viewTrackAsClient_button'),
|
||||
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.telegram_cid}"
|
||||
}])
|
||||
else:
|
||||
local_content = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user