Conversation
Cherry-picked from PR #5136 by thakoreh. setup_gateway() uses shutil.which('uv') at line 2126 but shutil was never imported at module level, causing NameError during Matrix E2EE auto-install. Adds top-level import and regression test.
Cherry-picked from PR #4343 by pjay-io. Synapse rejects chunked uploads without Content-Length. Adding filesize=len(data) ensures the upload includes proper sizing.
…ures Cherry-picked from PR #3695 by binhnt92. Matrix _sync_loop() and Mattermost _ws_loop() were retrying all errors forever, including permanent auth failures (expired tokens, revoked access). Now detects M_UNKNOWN_TOKEN, M_FORBIDDEN, 401/403 and stops instead of spinning. Includes 216 lines of tests.
…ments Cherry-picked from PR #3140 by chalkers, resolved against current main. Registers RoomEncryptedImage/Audio/Video/File callbacks, decrypts attachments via nio.crypto, caches all media types (images, audio, documents), prevents ciphertext URL fallback for encrypted media. Unifies the separate voice-message download into the main cache block. Preserves main's MATRIX_REQUIRE_MENTION, auto-thread, and mention stripping features. Includes 355 lines of encrypted media tests.
Cherry-picked run.py portion from PR #3495 by dlkakbs. When Matrix sends non-image files (text, YAML, JSON, etc.), the MIME type may be empty or application/octet-stream. Falls back to extension-based detection so text files are properly injected into agent context.
…origin fallback Salvaged from PRs #3767 (chalkers), #5236 (ygd58), #2641 (buntingszn). Three improvements to Matrix cron delivery: 1. Live adapter path: when the gateway is running, cron delivery now uses the connected MatrixAdapter via run_coroutine_threadsafe instead of the standalone HTTP PUT. This enables delivery to E2EE rooms where the raw HTTP path cannot encrypt. Falls back to standalone on failure. Threads adapters + event loop from gateway -> cron ticker -> tick() -> _deliver_result(). (from #3767) 2. HTML formatted_body: _send_matrix() now converts markdown to HTML using the optional markdown library, with h1-h6 to bold conversion for Element X compatibility. Falls back to plain text if markdown is not installed. Also adds random bytes to txn_id to prevent collisions. (from #5236) 3. Origin fallback: when deliver="origin" but origin is null (jobs created via API/scripts), falls back to HOME_CHANNEL env vars in order: matrix -> telegram -> discord -> slack. (from #2641)
|
This was referenced Apr 5, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Salvages and consolidates 8 Matrix-related PRs into a single cohesive improvement:
Phase 1 — Foundation fixes
filesize=len(data)tonio.upload()— Synapse rejects uploads without Content-Length.Phase 2 — Media handling
Phase 3 — Cron delivery
Superseded PRs to close
Contributors
Cherry-picked with authorship preserved: thakoreh, pjay-io, binhnt92, chalkers, dlkakbs, ygd58, buntingszn
Test plan