Conversation
Matrix -> Telegram: implement PinHandlingNetworkAPI and call messages.updatePinnedMessage for each added and removed message. Unpins are sent first, and new pins are sent oldest first so the resulting order in Telegram matches the Matrix pinned list. Telegram -> Matrix: handle updatePinnedMessages and updatePinnedChannelMessages (previously logged as "Unhandled update type") and queue them as a pin delta. updatePinnedDialogs stays as it was; that is chat list pinning, not message pinning. Also advertise the capability in GetCapabilities.
VeRychard
force-pushed
the
pins-bridge
branch
from
September 20, 2026 14:48
9a05843 to
3bfbfbb
Compare
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.
Implements pin bridging on top of the new bridgev2 pin infrastructure (mautrix/go#573 — depends on that merging + a mautrix-go release, CI will be red until then; the last commit of this branch was NOT pushed intentionally, it only redirects the local build to a go checkout).
Outbound (Matrix → Telegram):
HandleMatrixPinnedEventsconverts the diff into per-messagemessages.updatePinnedMessagecalls:m.room.pinned_eventsorderingInbound (Telegram → Matrix):
onPinnedMessageshandles bothUpdatePinnedMessagesandUpdatePinnedChannelMessagesand queues them as deltas against the current pinned list. Telegram expresses "unpinned all messages" as an unpin with an empty message list: that event carries no delta fields, so bridgev2 treats it as a full-list replacement with an empty list and clears the Matrix pins.Capabilities:
PinnedMessages: true+m.room.pinned_eventsatCapLevelFullySupported, baseID bumped tofi.mau.telegram.capabilities.2026_09_20.Live-verified 2026-09-20 on a self-hosted homeserver: Matrix→Telegram pin, Telegram→Matrix pin, and Telegram's "unpin all" all bridge correctly (previously inbound pins log
Unhandled update type *_tg.UpdatePinnedMessages_and are dropped).