Skip to content
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
darkrrb/fix/add-FetchStrangerGroupInfo-API
Apr 16, 2025
Merged

[Core] Add FetchStrangerGroupInfo API#804
Linwenxuan04 merged 1 commit intomasterfrom
darkrrb/fix/add-FetchStrangerGroupInfo-API

Conversation

@NoirHare
Copy link
Copy Markdown
Collaborator

No description provided.

@Linwenxuan04 Linwenxuan04 merged commit 946f845 into master Apr 16, 2025
8 checks passed
@NoirHare NoirHare requested a review from Copilot April 16, 2025 17:51
@NoirHare NoirHare deleted the darkrrb/fix/add-FetchStrangerGroupInfo-API branch April 16, 2025 17:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),
Copy link

Copilot AI Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants