mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(hub,web): support scheduling messages for future delivery (#590)
This commit is contained in:
@@ -322,13 +322,14 @@ export class ApiClient {
|
||||
return response.sessionId
|
||||
}
|
||||
|
||||
async sendMessage(sessionId: string, text: string, localId?: string | null, attachments?: AttachmentMetadata[]): Promise<void> {
|
||||
async sendMessage(sessionId: string, text: string, localId?: string | null, attachments?: AttachmentMetadata[], scheduledAt?: number | null): Promise<void> {
|
||||
await this.request(`/api/sessions/${encodeURIComponent(sessionId)}/messages`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
text,
|
||||
localId: localId ?? undefined,
|
||||
attachments: attachments ?? undefined
|
||||
attachments: attachments ?? undefined,
|
||||
scheduledAt: scheduledAt ?? undefined
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user