fixes
This commit is contained in:
parent
a9fc9433c6
commit
0830a0b2eb
|
|
@ -1,6 +1,6 @@
|
||||||
async def tg_process_template(
|
async def tg_process_template(
|
||||||
chat_wrap: 'Wrapped_CBot',
|
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
|
photo=None, audio=None, video=None, document=None, **kwargs
|
||||||
):
|
):
|
||||||
if (photo or video or audio or document) and message_id:
|
if (photo or video or audio or document) and message_id:
|
||||||
|
|
@ -24,6 +24,7 @@ async def tg_process_template(
|
||||||
photo,
|
photo,
|
||||||
caption=text,
|
caption=text,
|
||||||
reply_markup=keyboard,
|
reply_markup=keyboard,
|
||||||
|
content_id=content_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
elif video:
|
elif video:
|
||||||
|
|
@ -31,6 +32,7 @@ async def tg_process_template(
|
||||||
video,
|
video,
|
||||||
caption=text,
|
caption=text,
|
||||||
reply_markup=keyboard,
|
reply_markup=keyboard,
|
||||||
|
content_id=content_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
elif document:
|
elif document:
|
||||||
|
|
@ -38,12 +40,14 @@ async def tg_process_template(
|
||||||
document,
|
document,
|
||||||
caption=text,
|
caption=text,
|
||||||
reply_markup=keyboard,
|
reply_markup=keyboard,
|
||||||
|
content_id=content_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return await chat_wrap.send_message(
|
return await chat_wrap.send_message(
|
||||||
text,
|
text,
|
||||||
reply_markup=keyboard,
|
reply_markup=keyboard,
|
||||||
|
content_id=content_id,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class PlayerTemplates:
|
||||||
return await tg_process_template(
|
return await tg_process_template(
|
||||||
self, text, message_id=message_id, **template_kwargs,
|
self, text, message_id=message_id, **template_kwargs,
|
||||||
keyboard=get_inline_keyboard([*inline_keyboard_array, *extra_buttons]) if inline_keyboard_array else None,
|
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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue