last updates (links)
This commit is contained in:
1 parent
3511ebd247
commit
8651efd578
3 files changed
+60
-72
No files matched your search
@@ -17,9 +17,7 @@ from app.core.models.user import User
|
||||
from app.core.models.node_storage import StoredContent
|
||||
from app.core._utils.resolve_content import resolve_content
|
||||
from app.core.models.wallet_connection import WalletConnection
|
||||
from app.core._keyboards import get_inline_keyboard
|
||||
from app.core.models._telegram import Wrapped_CBotChat
|
||||
from app.core._utils.share_links import build_content_links
|
||||
|
||||
|
||||
MIN_ONCHAIN_INDEX = int(os.getenv("MIN_ONCHAIN_INDEX", "8"))
|
||||
@@ -243,28 +241,19 @@ async def indexer_loop(memory, platform_found: bool, seqno: int) -> [bool, int]:
|
||||
ref_id = user.ensure_ref_id()
|
||||
await session.commit()
|
||||
|
||||
_, startapp_url, web_url = build_content_links(
|
||||
encrypted_stored_content.cid.serialize_v2(),
|
||||
ref_id,
|
||||
project_host=PROJECT_HOST,
|
||||
bot_username=CLIENT_TELEGRAM_BOT_USERNAME
|
||||
)
|
||||
|
||||
message_text = user.translated('p_contentWasIndexed').format(
|
||||
item_address=item_address.to_string(1, 1, 1),
|
||||
item_index=item_index,
|
||||
)
|
||||
message_text += f"\n\n<a href=\"{web_url}\">🔗 Открыть контент</a>"
|
||||
|
||||
await user_uploader_wrapper.send_message(
|
||||
message_text,
|
||||
message_type='notification',
|
||||
reply_markup=get_inline_keyboard([
|
||||
[{
|
||||
'text': user.translated('viewTrackAsClient_button'),
|
||||
'url': startapp_url
|
||||
}]
|
||||
])
|
||||
message_type='notification'
|
||||
)
|
||||
|
||||
await user_uploader_wrapper.send_content(
|
||||
session,
|
||||
encrypted_stored_content
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user