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
3 changed files with 8 additions and 1 deletions
@@ -95,6 +95,7 @@ originalComponent?: (props?: OriginalMessageComponentProps) => React.JSX.Element
// @alpha // @alpha
export type CustomMessageRenderHints = { export type CustomMessageRenderHints = {
allowEditingEvent?: boolean; allowEditingEvent?: boolean;
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
}; };
// @alpha // @alpha
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@element-hq/element-web-module-api", "name": "@element-hq/element-web-module-api",
"type": "module", "type": "module",
"version": "1.2.0", "version": "1.3.0",
"description": "Module API surface for element-web", "description": "Module API surface for element-web",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -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.
* If this function is not supplied, media downloads are allowed.
*/
allowDownloadingMedia?: (mxEvent: MatrixEvent) => Promise<boolean>;
}; };
/** /**