mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 21:44:32 +00:00
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: b58492cfed
Co-authored-by: robbyczgw-cla <239660374+robbyczgw-cla@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
@@ -69,8 +69,13 @@ type MessagePollParams = {
|
||||
question: string;
|
||||
options: string[];
|
||||
maxSelections?: number;
|
||||
durationSeconds?: number;
|
||||
durationHours?: number;
|
||||
channel?: string;
|
||||
accountId?: string;
|
||||
threadId?: string;
|
||||
silent?: boolean;
|
||||
isAnonymous?: boolean;
|
||||
dryRun?: boolean;
|
||||
cfg?: OpenClawConfig;
|
||||
gateway?: MessageGatewayOptions;
|
||||
@@ -83,6 +88,7 @@ export type MessagePollResult = {
|
||||
question: string;
|
||||
options: string[];
|
||||
maxSelections: number;
|
||||
durationSeconds: number | null;
|
||||
durationHours: number | null;
|
||||
via: "gateway";
|
||||
result?: {
|
||||
@@ -239,6 +245,7 @@ export async function sendPoll(params: MessagePollParams): Promise<MessagePollRe
|
||||
question: params.question,
|
||||
options: params.options,
|
||||
maxSelections: params.maxSelections,
|
||||
durationSeconds: params.durationSeconds,
|
||||
durationHours: params.durationHours,
|
||||
};
|
||||
const plugin = getChannelPlugin(channel);
|
||||
@@ -257,6 +264,7 @@ export async function sendPoll(params: MessagePollParams): Promise<MessagePollRe
|
||||
question: normalized.question,
|
||||
options: normalized.options,
|
||||
maxSelections: normalized.maxSelections,
|
||||
durationSeconds: normalized.durationSeconds ?? null,
|
||||
durationHours: normalized.durationHours ?? null,
|
||||
via: "gateway",
|
||||
dryRun: true,
|
||||
@@ -279,8 +287,13 @@ export async function sendPoll(params: MessagePollParams): Promise<MessagePollRe
|
||||
question: normalized.question,
|
||||
options: normalized.options,
|
||||
maxSelections: normalized.maxSelections,
|
||||
durationSeconds: normalized.durationSeconds,
|
||||
durationHours: normalized.durationHours,
|
||||
threadId: params.threadId,
|
||||
silent: params.silent,
|
||||
isAnonymous: params.isAnonymous,
|
||||
channel,
|
||||
accountId: params.accountId,
|
||||
idempotencyKey: params.idempotencyKey ?? randomIdempotencyKey(),
|
||||
},
|
||||
timeoutMs: gateway.timeoutMs,
|
||||
@@ -295,6 +308,7 @@ export async function sendPoll(params: MessagePollParams): Promise<MessagePollRe
|
||||
question: normalized.question,
|
||||
options: normalized.options,
|
||||
maxSelections: normalized.maxSelections,
|
||||
durationSeconds: normalized.durationSeconds ?? null,
|
||||
durationHours: normalized.durationHours ?? null,
|
||||
via: "gateway",
|
||||
result,
|
||||
|
||||
Reference in New Issue
Block a user