Download avatars using the Widget API

If we can't authenticate media because we're
running as a widget, use the MC4039 widget API
instead of a direct fetch to download the avatar.
This commit is contained in:
JephDiel
2026-03-07 19:44:00 -06:00
parent 00f880108e
commit 005b965fba
3 changed files with 122 additions and 23 deletions

View File

@@ -93,6 +93,7 @@ export const initializeWidget = (
logger.info("Widget API is available");
const api = new WidgetApi(widgetId, parentOrigin);
api.requestCapability(MatrixCapabilities.AlwaysOnScreen);
api.requestCapability(MatrixCapabilities.MSC4039DownloadFile);
// Set up the lazy action emitter, but only for select actions that we
// intend for the app to handle