Add message call metadata#7
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 20 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new ChangesMessageCall Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for Discord “call” metadata on messages and ensures State.MessageAdd merges call updates into cached messages.
Changes:
- Add
Message.Callfield and newMessageCalltype for call metadata. - Update
State.MessageAddto mergeCallinto existing cached messages. - Add tests covering JSON unmarshalling of
calland state merge behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| state.go | Merge the Call field when updating an existing cached message. |
| message.go | Add Call *MessageCall to the Message struct JSON model. |
| message_call.go | Introduce MessageCall type to represent call participants and end time. |
| message_test.go | Add unit tests for call unmarshalling and state merge semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Participants []string `json:"participants"` | ||
|
|
||
| // The time at which the call ended, if it has ended. | ||
| EndedTimestamp *time.Time `json:"ended_timestamp"` |
12a1d26 to
9ad2277
Compare
Summary
Adds Discord private call metadata to
Messageso consumers can read the call participant list and optional end timestamp from gateway message payloads.Changes
MessageCallforcall.participantsandcall.ended_timestampMessage.Callon message payloadsTesting
go test . -run 'TestMessage_Unmarshal(Call|ActiveCall)|TestState_MessageAddMergesCall' -count=1