[Core & Milky] Implement accept_group_invitation action#41
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the accept_group_invitation action functionality for the Lagrange bot framework, allowing users to programmatically accept group invitations through the API.
- Adds a new API handler for accepting group invitations with required parameters
- Implements the underlying service layer communication using the 0x10C8 protocol
- Exposes the functionality through the bot context interface
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Lagrange.Milky/Utility/JsonUtility.cs | Adds JSON serialization support for the new parameter type |
| Lagrange.Milky/Api/Handler/Request/AcceptGroupInvitationRequestHandler.cs | Implements the API handler and parameter class for accepting group invitations |
| Lagrange.Core/Internal/Services/System/SetGroupInviteAcceptService.cs | Creates the service layer for handling group invitation acceptance protocol |
| Lagrange.Core/Internal/Packets/Service/Oidb_0x10C8.cs | Defines protocol packet structures for the 0x10C8 service |
| Lagrange.Core/Internal/Logic/OperationLogic.cs | Adds the business logic method for accepting group invitations |
| Lagrange.Core/Internal/Events/System/SetGroupInviteSelfAcceptEvent.cs | Defines the event classes for group invitation acceptance |
| Lagrange.Core/Common/Interface/MessageExt.cs | Exposes the functionality through the BotContext extension method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| @@ -0,0 +1,35 @@ | |||
| using System.Text; | |||
There was a problem hiding this comment.
Duplicate Service! SetGroupNotificationService.cs
This will cause the process to fail! Didn't you test it?
| await context.EventContext.SendEvent<GroupMemberRenameEventResp>(new GroupMemberRenameEventReq(groupUin, uid, name)); | ||
| } | ||
|
|
||
| public async Task SetGroupInviteSelfAccept(long groupUin, long sequence) |
| @@ -0,0 +1,13 @@ | |||
| namespace Lagrange.Core.Internal.Events.System; | |||
There was a problem hiding this comment.
Please use SetGroupNotification! Remove this event
|
|
||
| public static Task GroupQuit(this BotContext context, long groupUin) | ||
| => context.EventContext.GetLogic<OperationLogic>().GroupQuit(groupUin); | ||
|
|
6825c5e to
fc560c0
Compare
No description provided.