Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Conversation

@DarkRRb
Copy link
Collaborator

@DarkRRb DarkRRb commented May 18, 2025

No description provided.

Copy link
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 addresses an issue where replies sent by the old client are preceded by extra elements by refining message filtering rules and adjusting related message processing logic.

  • Introduces a new message filter rule in AtBeforeReplyInOldClient.cs (with a naming discrepancy to address) to filter out extra leading elements.
  • Updates the preview string construction in ForwardEntity.
  • Adds a FriendRecallPoke case to improve push message event handling.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Lagrange.Core/Message/Filter/Rule/AtBeforeReplyInOldClient.cs Adds a new filter rule; however, the class name does not match the file name.
Lagrange.Core/Message/Filter/MessageFilter.cs Registers the new filter rule in the filter configuration.
Lagrange.Core/Message/Entity/ForwardEntity.cs Changes the conversion of a forwarded message to preview by using Chain.Sequence instead of Chain.ToPreviewString().
Lagrange.Core/Internal/Service/Message/PushMessageService.cs Adds a new case for FriendRecallPoke event handling with a hex payload comment.
Comments suppressed due to low confidence (2)

Lagrange.Core/Message/Filter/Rule/AtBeforeReplyInOldClient.cs:6

  • The class name AtBeforeForwardInOldClient does not match the file name AtBeforeReplyInOldClient.cs. Consider renaming the class or the file for consistency.
public class AtBeforeForwardInOldClient : IMessageFilterRule

Lagrange.Core/Message/Entity/ForwardEntity.cs:116

  • Replacing Chain.ToPreviewString() with Chain.Sequence alters the preview string format. Confirm that this change is intentional and that downstream consumers can handle the new format.
string IMessageEntity.ToPreviewString() => "$[Forward] { {Chain.Sequence} }";

@pk5ls20 pk5ls20 changed the title [Core] fix replay sent by the old client is preceded by extra elements [Core] fix reply sent by the old client is preceded by extra elements May 18, 2025
@DarkRRb DarkRRb changed the title [Core] fix reply sent by the old client is preceded by extra elements [Core] fix forward sent by the old client is preceded by extra elements May 18, 2025
@DarkRRb DarkRRb merged commit ddfda36 into master May 18, 2025
8 checks passed
@DarkRRb DarkRRb deleted the darkrrb/fix/replay-sent-by-the-old-client-is-preceded-by-extra-elements branch May 18, 2025 12:09
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