fix: Voluntary leaves now render as "left the group" instead of Kicked#223
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughMembership-leave handling now propagates an explicit change sender through Matrix and LINE connector paths. Event construction preserves sender metadata, leave handlers use sender-aware helpers, and tests cover voluntary leaves and removals. ChangesMembership change sender propagation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant LINE
participant LeaveHandler
participant MemberChangeEmitter
LINE->>LeaveHandler: notify member leave
LeaveHandler->>MemberChangeEmitter: emit leave with leaver sender
MemberChangeEmitter-->>LINE: produce membership-leave ChatInfoChange
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/connector/sync.go (1)
2341-2350: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace deprecated
MemberswithMemberMap.
pkg/connector/sync.go#L2341-L2350should build the member list withMemberMap, andpkg/connector/sync_test.go#L57-L60should assert the entry formember.Senderinstead of indexingMembers.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/connector/sync.go` around lines 2341 - 2350, The member-list construction in pkg/connector/sync.go lines 2341-2350 must replace deprecated Members with MemberMap, keyed by member.Sender while preserving the existing ChatMember value and fields. Update the corresponding assertion in pkg/connector/sync_test.go lines 57-60 to inspect the MemberMap entry for member.Sender instead of indexing Members.Sources: Coding guidelines, Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/connector/sync.go`:
- Around line 2341-2350: The member-list construction in pkg/connector/sync.go
lines 2341-2350 must replace deprecated Members with MemberMap, keyed by
member.Sender while preserving the existing ChatMember value and fields. Update
the corresponding assertion in pkg/connector/sync_test.go lines 57-60 to inspect
the MemberMap entry for member.Sender instead of indexing Members.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7838cd1b-98fa-4295-b2b6-2c653db45521
📒 Files selected for processing (2)
pkg/connector/sync.gopkg/connector/sync_test.go
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: build-docker
- GitHub Check: Lint with 1.25
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
**/*.go: Usego fmtfor code formatting across all Go files
Usegoimportswith-local "github.com/highesttt/matrix-line-messenger"flag to group project-local imports correctly
Usezerologfor logging throughout the codebase
Do not useMsgfin logging; useMsgwith structured fields instead
UseStringerinterface where applicable in Go code
Files:
pkg/connector/sync_test.gopkg/connector/sync.go
**/!(ltsm)/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
**/!(ltsm)/**/*.go: Runstaticcheckon all Go files excludingpkg/ltsmpackage (transpiled WASM code)
Rungo veton all Go files excludingpkg/ltsmpackage (transpiled WASM code)
Files:
pkg/connector/sync_test.gopkg/connector/sync.go
🪛 GitHub Actions: CI / 3_Lint with 1.25.txt
pkg/connector/sync_test.go
[error] 57-57: staticcheck (go-staticcheck) failed with exit code 1. SA1019: evt.ChatInfoChange.MemberChanges.Members is deprecated: Use MemberMap instead to avoid duplicate entries.
🪛 GitHub Actions: CI / Lint with 1.25
pkg/connector/sync_test.go
[error] 57-57: staticcheck (go-staticcheck) failed: SA1019: evt.ChatInfoChange.MemberChanges.Members is deprecated. Use MemberMap instead to avoid duplicate entries.
🪛 GitHub Check: Lint with 1.25
pkg/connector/sync_test.go
[failure] 57-57:
evt.ChatInfoChange.MemberChanges.Members is deprecated: Use MemberMap instead to avoid duplicate entries (SA1019)
🔇 Additional comments (4)
pkg/connector/sync.go (3)
1863-1865: LGTM!
2363-2383: LGTM!
2507-2519: LGTM!pkg/connector/sync_test.go (1)
13-17: LGTM!
|
@highesttt beast 🤝 |
|
No description provided.