fix(signal): align supported message actions (#104788)

* fix(signal): align supported message actions

* test(signal): clarify supported message actions

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
llagy007
2026-07-12 08:34:07 +08:00
committed by GitHub
parent a0c4c31a17
commit d8bcd014c7
2 changed files with 4 additions and 2 deletions

View File

@@ -61,9 +61,11 @@ describe("signalMessageActions", () => {
);
});
it("skips send for plugin dispatch", () => {
it("supports only reactions for plugin dispatch", () => {
expect(signalMessageActions.supportsAction?.({ action: "send" })).toBe(false);
expect(signalMessageActions.supportsAction?.({ action: "react" })).toBe(true);
expect(signalMessageActions.supportsAction?.({ action: "delete" })).toBe(false);
expect(signalMessageActions.supportsAction?.({ action: "pin" })).toBe(false);
});
it("blocks reactions when the action gate is disabled", async () => {

View File

@@ -96,7 +96,7 @@ export const signalMessageActions: ChannelMessageActionAdapter = {
return { actions: Array.from(actions) };
},
supportsAction: ({ action }) => action !== "send",
supportsAction: ({ action }) => action === "react",
handleAction: async ({ action, params, cfg, accountId, toolContext }) => {
if (action === "send") {