This repository was archived by the owner on Oct 12, 2025. It is now read-only.
[Core] Add FetchStrangerGroupInfo API#804
Merged
Linwenxuan04 merged 1 commit intomasterfrom Apr 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new API endpoint, FetchStrangerGroupInfo, to retrieve group information for non-friends, along with updates to related services and request/response structures.
- Added GetStrangerGroupInfoService and its supporting event and entity.
- Refactored existing GetGroupInfoService to use unified OidbSvcTrpcTcp0x88D classes.
- Extended OperationLogic and OperationExt to expose the new stranger group info API.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Lagrange.Core/Internal/Service/Message/GetStrangerGroupInfoService.cs | Implements a new service to build and parse stranger group info requests/responses. |
| Lagrange.Core/Internal/Service/Message/GetGroupInfoService.cs | Updates the group info service to use the unified OidbSvcTrpcTcp0x88D classes and random field generation. |
| Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x88D.cs | Refactors class names and removes an attribute for the OidbSvcTrpcTcp request. |
| Lagrange.Core/Internal/Event/Message/GetStrangerGroupEvent.cs | Introduces an event class for stranger group info responses. |
| Lagrange.Core/Internal/Context/Logic/Implementation/OperationLogic.cs | Adds a new method to fetch stranger group info using the API event. |
| Lagrange.Core/Common/Interface/Api/OperationExt.cs | Adds a new extension method to trigger FetchStrangerGroupInfo from the bot context. |
| Lagrange.Core/Common/Entity/BotStrangerGroupInfo.cs | Defines a new entity to represent stranger group information. |
Comments suppressed due to low confidence (1)
Lagrange.Core/Internal/Packets/Service/Oidb/Request/OidbSvcTrpcTcp0x88D.cs:11
- The removal of the attribute [OidbSvcTrpcTcp(0x88D, 0)] might affect service routing or registration; ensure that this change is in line with the intended service configuration.
-[OidbSvcTrpcTcp(0x88D, 0)]
| { | ||
| var packet = new OidbSvcTrpcTcpBase<OidbSvcTrpcTcp0x88D>(new OidbSvcTrpcTcp0x88D | ||
| { | ||
| Field1 = (uint)Random.Shared.NextInt64(), |
There was a problem hiding this comment.
Casting a 64-bit random value to a 32-bit uint may introduce truncation issues; consider using a random method that directly returns a uint or otherwise handle potential overflow explicitly.
Suggested change
| Field1 = (uint)Random.Shared.NextInt64(), | |
| Field1 = (uint)Random.Shared.Next(), |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.