mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 07:20:29 +03:00
Render captions to m.file, m.image, m.video, and m.audio (#2059)
* Add rendering image captions * Handle sending captions for images * Fix caption rendering on m.video and m.audio too * Remove unused renderBody() parameter * Fix m.file rendering body instead of filename where possible * Add caption rendering for generic files + Fix video and audio not properly sending captions * Use m.text for captions & render on demand * Allow custom HTML in sending captions * Don't *send* captions * mvoe content const into renderCaption() --------- Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
This commit is contained in:
parent
3c5afaf33a
commit
02437a6a20
4 changed files with 118 additions and 73 deletions
|
|
@ -43,6 +43,7 @@ export type IThumbnailContent = {
|
|||
export type IImageContent = {
|
||||
msgtype: MsgType.Image;
|
||||
body?: string;
|
||||
filename?: string;
|
||||
url?: string;
|
||||
info?: IImageInfo & IThumbnailContent;
|
||||
file?: IEncryptedFile;
|
||||
|
|
@ -51,6 +52,7 @@ export type IImageContent = {
|
|||
export type IVideoContent = {
|
||||
msgtype: MsgType.Video;
|
||||
body?: string;
|
||||
filename?: string;
|
||||
url?: string;
|
||||
info?: IVideoInfo & IThumbnailContent;
|
||||
file?: IEncryptedFile;
|
||||
|
|
@ -59,6 +61,7 @@ export type IVideoContent = {
|
|||
export type IAudioContent = {
|
||||
msgtype: MsgType.Audio;
|
||||
body?: string;
|
||||
filename?: string;
|
||||
url?: string;
|
||||
info?: IAudioInfo;
|
||||
file?: IEncryptedFile;
|
||||
|
|
@ -67,6 +70,7 @@ export type IAudioContent = {
|
|||
export type IFileContent = {
|
||||
msgtype: MsgType.File;
|
||||
body?: string;
|
||||
filename?: string;
|
||||
url?: string;
|
||||
info?: IFileInfo & IThumbnailContent;
|
||||
file?: IEncryptedFile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue