mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 21:51:06 +00:00
da500d4b7d
* Fetch authenticated media through the session for "Save image as" The desktop "Save image as" context-menu item fetched http(s) images with the main-process global fetch(), which bypasses the session's webRequest interceptors — including the authenticated-media handlers in media-auth.ts that rewrite the download URL and attach the Authorization header. On modern Synapse (authenticated media, MSC3916) that fetch is rejected with 401/404, so saving an image failed (#32362). Extract the save logic into a dedicated save-image.ts and fetch network URLs through the image's Electron session (webContents.session.fetch) so the auth interceptors apply; data: URLs are still decoded directly into a NativeImage. The module also keeps the extension-aware encoding (jpg/jpeg/bmp/png) so its contract can be unit-tested. * Use the contributor's own copyright header on the new save-image files