mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-17 05:21:36 +00:00
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:
@@ -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 () => {
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user