← Back to PRs

#15994: feat(signal): add unsend, poll create, poll vote, and poll terminate actions

by heyhudson open 2026-02-14 04:48 View on GitHub →
docs channel: signal gateway size: XL trusted-contributor
## Summary Signal supported `send` and `react` message actions, but not `unsend`, even though signal-cli exposes `remoteDelete`. That meant agents and users could not retract mistaken or sensitive messages through OpenClaw. This PR adds Signal `unsend` support end-to-end and keeps it consistent with existing action-gating behavior. ## What Changed ### Signal remote delete transport - `src/signal/send.ts`: Added `sendRemoteDeleteSignal(to, targetTimestamp, opts)`. - `src/signal/send.ts`: Reuses existing Signal target parsing and account context resolution. - `src/signal/send.ts`: Maps recipient/group/username targets to the `remoteDelete` RPC payload. - `src/signal/send.ts`: Rejects invalid timestamps (`<= 0`, non-finite) before RPC. ### Signal action integration and capability surface - `src/channels/plugins/actions/signal.ts`: `listActions` now includes `unsend` when at least one configured Signal account allows `actions.unsend`. - `src/channels/plugins/actions/signal.ts`: Added `action === "unsend"` handler with `actions.unsend` gate enforcement, recipient/group validation (`recipient` or `to`), positive numeric `messageId` validation, and dispatch to `sendRemoteDeleteSignal`. - `src/channels/dock.ts`: Marked Signal capabilities with `unsend: true` so capability surfaces advertise support. ### Config and test coverage - `src/config/types.signal.ts`: Added typed `actions.unsend?: boolean` in Signal account config. - `src/signal/send.test.ts`: Added coverage for payload mapping for recipient/group/username targets, timestamp validation, and success return. - `src/channels/plugins/actions/actions.test.ts`: Updated Signal action-list expectations to include `unsend`. ## Design Notes - The RPC call is implemented in `src/signal/send.ts` (not inline in the adapter) to keep Signal transport and target mapping centralized and reusable. - `actions.unsend` uses the same gate pattern as other actions (`createActionGate`), preserving backward-compatible defaults. - Strict timestamp validation fails early and avoids invalid `remoteDelete` calls, but intentionally rejects non-numeric message identifiers. ## Testing - Ran: `pnpm test src/signal/send.test.ts src/channels/plugins/actions/actions.test.ts` - Result: 2 test files passed, 49 tests passed. ## AI Disclosure - [x] AI-assisted - [x] Fully tested ## Related Issues - #15536 --- Closes #15536 Closes #22259

Most Similar PRs