Add message hint to prevent media from being downloaded.
This commit is contained in:
@@ -78,6 +78,7 @@ originalComponent?: (props?: OriginalComponentProps) => React.JSX.Element) => JS
|
|||||||
// @alpha
|
// @alpha
|
||||||
export type CustomMessageRenderHints = {
|
export type CustomMessageRenderHints = {
|
||||||
allowEditingEvent?: boolean;
|
allowEditingEvent?: boolean;
|
||||||
|
allowDownloadingMedia?: boolean | Promise<boolean>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// @alpha @deprecated (undocumented)
|
// @alpha @deprecated (undocumented)
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ export type CustomMessageRenderHints = {
|
|||||||
* Default is true.
|
* Default is true.
|
||||||
*/
|
*/
|
||||||
allowEditingEvent?: boolean;
|
allowEditingEvent?: boolean;
|
||||||
|
/**
|
||||||
|
* If an event contains media, this function will be called to check
|
||||||
|
* if the media can be prompted to be downloaded as a file.
|
||||||
|
* Default is true.
|
||||||
|
*/
|
||||||
|
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user