feat: Send Status (status@broadcast) {text, media, audio(with waveform)} (#249)

Co-authored-by: Davidson Gomes <contato@agenciadgcode.com>
This commit is contained in:
Davidson Gomes
2023-07-18 10:25:16 -03:00
committed by GitHub
parent 3ed3e77f58
commit cba9827851
6 changed files with 86 additions and 18 deletions

View File

@@ -198,6 +198,8 @@ export type MessageRelayOptions = MinimalRelayOptions & {
additionalAttributes?: { [_: string]: string }
/** should we use the devices cache, or fetch afresh from the server; default assumed to be "true" */
useUserDevicesCache?: boolean
/** jid list of participants for status@broadcast */
statusJidList?: string[]
}
export type MiscMessageGenerationOptions = MinimalRelayOptions & {
@@ -209,6 +211,12 @@ export type MiscMessageGenerationOptions = MinimalRelayOptions & {
ephemeralExpiration?: number | string
/** timeout for media upload to WA server */
mediaUploadTimeoutMs?: number
/** jid list of participants for status@broadcast */
statusJidList?: string[]
/** backgroundcolor for status */
backgroundColor?: string
/** font type for status */
font?: number
}
export type MessageGenerationOptionsFromContent = MiscMessageGenerationOptions & {
userJid: string
@@ -226,6 +234,10 @@ export type MediaGenerationOptions = {
mediaUploadTimeoutMs?: number
options?: AxiosRequestConfig
backgroundColor?: string
font?: number
}
export type MessageContentGenerationOptions = MediaGenerationOptions & {
getUrlInfo?: (text: string) => Promise<WAUrlInfo | undefined>