fixes
This commit is contained in:
1 parent
a9fc9433c6
commit
0830a0b2eb
2 files changed
+6
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
async def tg_process_template(
|
||||
chat_wrap: 'Wrapped_CBot',
|
||||
text, keyboard=None, message_id=None,
|
||||
text, keyboard=None, message_id=None, content_id=None,
|
||||
photo=None, audio=None, video=None, document=None, **kwargs
|
||||
):
|
||||
if (photo or video or audio or document) and message_id:
|
||||
@@ -24,6 +24,7 @@ async def tg_process_template(
|
||||
photo,
|
||||
caption=text,
|
||||
reply_markup=keyboard,
|
||||
content_id=content_id,
|
||||
**kwargs
|
||||
)
|
||||
elif video:
|
||||
@@ -31,6 +32,7 @@ async def tg_process_template(
|
||||
video,
|
||||
caption=text,
|
||||
reply_markup=keyboard,
|
||||
content_id=content_id,
|
||||
**kwargs
|
||||
)
|
||||
elif document:
|
||||
@@ -38,12 +40,14 @@ async def tg_process_template(
|
||||
document,
|
||||
caption=text,
|
||||
reply_markup=keyboard,
|
||||
content_id=content_id,
|
||||
**kwargs
|
||||
)
|
||||
else:
|
||||
return await chat_wrap.send_message(
|
||||
text,
|
||||
reply_markup=keyboard,
|
||||
content_id=content_id,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@@ -66,7 +66,7 @@ class PlayerTemplates:
|
||||
return await tg_process_template(
|
||||
self, text, 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']}
|
||||
message_type=f'content/{content_type}', message_meta={'content_sha256': content_meta['hash']}, content_id=content.id
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user