mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 04:06:44 +02:00
Merge pull request #41 from element-hq/hs/add-allow-download
Add message hint to prevent media from being downloaded.
This commit is contained in:
commit
65ced81a8f
@ -78,6 +78,7 @@ originalComponent?: (props?: OriginalComponentProps) => React.JSX.Element) => JS
|
||||
// @alpha
|
||||
export type CustomMessageRenderHints = {
|
||||
allowEditingEvent?: boolean;
|
||||
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
|
||||
};
|
||||
|
||||
// @alpha @deprecated (undocumented)
|
||||
|
||||
@ -44,6 +44,12 @@ export type CustomMessageRenderHints = {
|
||||
* Default is true.
|
||||
*/
|
||||
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.
|
||||
* If this function is not supplied, media downloads are allowed.
|
||||
*/
|
||||
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user