From 4605a467653ae33d10734784175dc197f2e866b4 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 29 May 2025 21:01:24 +0300 Subject: [PATCH] nice text --- app/core/background/ton_service.py | 15 ---------- app/core/models/_telegram/templates/player.py | 29 +------------------ 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/app/core/background/ton_service.py b/app/core/background/ton_service.py index 5b5e1db..e9dba98 100644 --- a/app/core/background/ton_service.py +++ b/app/core/background/ton_service.py @@ -63,21 +63,6 @@ async def main_fn(memory): make_log("TON", "Withdraw command sent", level="info") await asyncio.sleep(10) return await main_fn(memory) - - if os.getenv("TON_BEGIN_COMMAND_QQ"): - await toncenter.send_boc( - service_wallet.create_transfer_message( - [{ - 'address': "UQD70vlDUDfdhdRFWeFx_F9FEdRdKwOsuADMLTrz6O6Q4DZ_", - 'amount': 1, - 'send_mode': 128, - 'payload': begin_cell().end_cell() - }], sw_seqno_value - )['message'].to_boc(False) - ) - make_log("TON", "Withdraw command sent", level="info") - await asyncio.sleep(10) - return await main_fn(memory) # TODO: не деплоить если указан master_address и мы проверили что аккаунт существует. Сейчас platform у каждой ноды будет разным platform_state = await toncenter.get_account(platform.address.to_string(1, 1, 1)) diff --git a/app/core/models/_telegram/templates/player.py b/app/core/models/_telegram/templates/player.py index e212b0a..5a864bf 100644 --- a/app/core/models/_telegram/templates/player.py +++ b/app/core/models/_telegram/templates/player.py @@ -131,33 +131,6 @@ class PlayerTemplates: if cover_content: # Add thumbnail if cover content is available template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url) - - if self.bot_id == 1: pass - # Buttons for sharing and opening in app - # inline_keyboard_array.append([ - # { - # 'text': self.user.translated('shareVideo_button'), - # 'switch_inline_query': f"Q{user_existing_license.onchain_address}" if user_existing_license else f"C{content.cid.serialize_v2()}", - # }, - # { - # 'text': self.user.translated('shareLink_button'), - # 'url': f"https://t.me/share/url?text={urllib.parse.quote(content_share_link['text'])}&url={urllib.parse.quote(content_share_link['url'])}" - # } - # ]) - # inline_keyboard_array.append([{ - # 'text': self.user.translated('openTrackInApp_button'), - # 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp={content.cid.serialize_v2()}" - # }]) - else: - # Buttons for viewing as a client and opening contract - inline_keyboard_array.append([{ - 'text': self.user.translated('viewTrackAsClient_button'), - 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}" - }]) - inline_keyboard_array.append([{ - 'text': self.user.translated('openContractPage_button'), - 'url': f"https://tonviewer.com/address/{content_meta['item_address']}" - }]) else: local_content = None @@ -203,7 +176,7 @@ class PlayerTemplates: await self.delete_message(kmsg.message_id) r = await tg_process_template( - self, text + '\n\n' + f"""🌐 Открыть на MY""", message_id=message_id, **template_kwargs, + self, text + '\n\n' + f"""🌐 Открыть на MY""", message_id=message_id, **template_kwargs, keyboard=get_inline_keyboard([*inline_keyboard_array, *extra_buttons]) if inline_keyboard_array else None, message_type=f'content/{content_type}', message_meta={'content_sha256': content_meta['hash']} if local_content else {},