Skip to content

feat: add matrix content scanner support#2332

Merged
td-famedly merged 1 commit into
mainfrom
khalil/content-scanner-support
May 19, 2026
Merged

feat: add matrix content scanner support#2332
td-famedly merged 1 commit into
mainfrom
khalil/content-scanner-support

Conversation

@kamor-famedly
Copy link
Copy Markdown
Contributor

@kamor-famedly kamor-famedly commented May 7, 2026

https://github.com/famedly/product-management/issues/3861
This PR implements support for routing media downloads through a Matrix content scanner proxy.

When contentScannerConfig is set, MXC download and thumbnail URLs are resolved against the scanner endpoints. downloadAndDecryptAttachment() now also supports scanner-backed downloads for encrypted
attachments by posting the encrypted file metadata to download_encrypted, then decrypting the returned bytes client-side as before.

The implementation was tested end-to-end against our staging server using the local scanner proxy tool at tool/content_scanner_proxy.dart.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.90%. Comparing base (562dbb8) to head (5b0b0fc).

Files with missing lines Patch % Lines
lib/src/event.dart 87.09% 4 Missing ⚠️
lib/src/utils/uri_extension.dart 85.71% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2332      +/-   ##
==========================================
+ Coverage   55.71%   55.90%   +0.19%     
==========================================
  Files         160      161       +1     
  Lines       19862    19923      +61     
==========================================
+ Hits        11066    11138      +72     
+ Misses       8796     8785      -11     
Files with missing lines Coverage Δ
lib/matrix_api_lite/model/matrix_keys.dart 81.63% <ø> (ø)
lib/src/client.dart 59.61% <ø> (ø)
lib/src/utils/content_scanner_config.dart 100.00% <100.00%> (ø)
lib/src/utils/uri_extension.dart 57.14% <85.71%> (+8.20%) ⬆️
lib/src/event.dart 83.49% <87.09%> (+0.45%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 562dbb8...5b0b0fc. Read the comment docs.

Copy link
Copy Markdown
Contributor

@krille-chan krille-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kamor-famedly can you link an issue here?

Comment thread test/tool/content_scanner_proxy.dart
Comment thread lib/src/event.dart Outdated
@kamor-famedly kamor-famedly force-pushed the khalil/content-scanner-support branch from c0d2a9e to 14369da Compare May 14, 2026 20:51
Copy link
Copy Markdown
Member

@td-famedly td-famedly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg as well

@kamor-famedly kamor-famedly force-pushed the khalil/content-scanner-support branch 2 times, most recently from 70278e2 to c247d5a Compare May 18, 2026 20:07
@kamor-famedly kamor-famedly force-pushed the khalil/content-scanner-support branch from c247d5a to 5b0b0fc Compare May 19, 2026 16:47
@td-famedly td-famedly merged commit 79357b8 into main May 19, 2026
16 checks passed
@td-famedly td-famedly deleted the khalil/content-scanner-support branch May 19, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants