fix(qqbot): authorize dm approval interactions - #46154
Closed
Diyoncrz18 wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Duplicate of #31593 — this is part of the large QQBot DM-approval one-line-fix cluster (treat chat_type 'dm' the same as 'c2c' for approval authorization, fixing #35760/#32528). #31593 is the earliest still-open PR in the cluster; other open siblings include #32752, #36774, #40705, #40926, #41801. Marking duplicate for cluster consolidation. |
Contributor
Author
|
Closing this as a duplicate of #31593 for the QQBot DM approval authorization cluster consolidation. Thanks for checking and consolidating the related PRs. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #35760
Refs #40655
What does this PR do?
This fixes QQBot approval interaction authorization for direct-message sessions.
Hermes creates QQBot direct-message sessions with
chat_type="dm", while the QQBot approval authorization check only treatedchat_type="c2c"as a direct chat. As a result, approval button clicks from QQ direct messages could be rejected even when the operator matched the chat id.This PR treats both
c2canddmas QQBot direct chat types for approval authorization while preserving the existingoperator == chat_idcheck.Changes Made
dmdirect-message session keys.c2cbehavior.dmapproval clicks andc2cbackward compatibility.How to Test
agent:main:qqbot:dm:<chat_id>.<chat_id>.Validation
Run locally:
Not run locally: