Merge branch 'main' of github.com:/element-hq/element-web-modules into t3chguy/restricted-guests-api

This commit is contained in:
Michael Telatynski 2025-07-16 15:03:44 +01:00
commit 9f14297827
3 changed files with 8 additions and 1 deletions

View File

@ -95,6 +95,7 @@ originalComponent?: (props?: OriginalMessageComponentProps) => React.JSX.Element
// @alpha
export type CustomMessageRenderHints = {
allowEditingEvent?: boolean;
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
};
// @alpha

View File

@ -1,7 +1,7 @@
{
"name": "@element-hq/element-web-module-api",
"type": "module",
"version": "1.2.0",
"version": "1.3.0",
"description": "Module API surface for element-web",
"repository": {
"type": "git",

View File

@ -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>;
};
/**