fix(auto-reply): gate inline directives on resolved auth (#27248)

Landed from contributor PR #27248 by @kevinWangSheng.

Co-authored-by: shenghui kevin <shenghuikevin@shenghuideMac-mini.local>
This commit is contained in:
Peter Steinberger
2026-02-26 13:11:18 +00:00
parent 7d8aeaaf06
commit 473a27470f
2 changed files with 4 additions and 1 deletions

View File

@@ -252,7 +252,9 @@ export async function resolveReplyDirectives(params: {
}
}
}
let directives = commandAuthorized
// Use command.isAuthorizedSender (resolved authorization) instead of raw commandAuthorized
// to ensure inline directives work when commands.allowFrom grants access (e.g., LINE).
let directives = command.isAuthorizedSender
? parsedDirectives
: {
...parsedDirectives,