Repository navigation
Conversation
Handle SEND_CHAT_CHECKED (operation 40) so that a chat read in the LINE mobile app is also marked as read on Matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Handle
SEND_CHAT_CHECKED(operation 40) so that a chat read in the LINE mobile app is also marked as read on Matrix.Why
Operation 40 currently reaches the
defaultbranch inhandleOperationand is only logged at debug level. A chat that has been read on the phone therefore stays unread in Beeper.I searched existing issues and PRs for "read receipt" and did not find a report of this. I hit it as a user of the bridge.
Changes
OpSendChatChecked = 40.param1is the chat MID andparam2is the last message read.simplevent.ReceiptwithIsFromMe: trueandLastTargetset to that message.ReadUpTofallback.Testing
Tested on a self-hosted bridge (
bbctl, Docker) against a real LINE account on 2026-11-07 (JST). The test build added one temporary log line for operation 40, which is not part of this PR.read_markersreturned 200 for the Matrix user (double puppet), and the chat was no longer unread in BeeperAutomated:
makeOwnReadReceiptEvent.go test ./...passes on the previous base (a9cefaf). After rebasing ontoae61689, I re-ranpkg/connector,pkg/e2eeandpkg/line, which pass apart from the flaky test below.pkgandpkg/ltsmdid not complete in that re-run: thepkg/ltsmcompile was killed on my machine.TestForcedLogoutWinsOverEnsureValidTokenRefreshfails intermittently, unrelated to this change: 3 of 40 runs on unmodifiedmainand 1 of 40 with this PR.pre-commit runon the changed files passes (run on the previous base).bridgelintreports 0 errors and 2 warnings, both in files this PR does not touch (handlers/image.go,userinfo.go).Not tested:
Related Issues
None found.
Risks
sendChatCheckedis sent withreqSeq0, so unlike reactions it is not filtered as our own echo. A read made in Beeper can come back as operation 40 and cause one redundantread_markersrequest. mautrix ignores receipts carrying the double puppet marker, so this should not loop, which matches what I saw in testing.AI disclosure
This PR was written with Claude Code. I ran the live test myself and reviewed the result.
🤖 Generated with Claude Code