feat(business): change profile/cover photo and manage quick replies (#1724)

This commit is contained in:
vini
2025-09-07 08:08:26 -03:00
committed by GitHub
parent 084761dc31
commit 50fc83b008
8 changed files with 217 additions and 8 deletions
+28 -1
View File
@@ -26,6 +26,7 @@ import type {
WAReadReceiptsValue
} from '../Types'
import { ALL_WA_PATCH_NAMES } from '../Types'
import type { QuickReplyAction } from '../Types/Bussines.js'
import type { LabelActionBody } from '../Types/Label'
import { SyncState } from '../Types/State'
import {
@@ -997,6 +998,30 @@ export const makeChatsSocket = (config: SocketConfig) => {
)
}
/**
* Add or Edit Quick Reply
*/
const addOrEditQuickReply = (quickReply: QuickReplyAction) => {
return chatModify(
{
quickReply
},
''
)
}
/**
* Remove Quick Reply
*/
const removeQuickReply = (timestamp: string) => {
return chatModify(
{
quickReply: { timestamp, deleted: true }
},
''
)
}
/**
* queries need to be fired on connection open
* help ensure parity with WA Web
@@ -1200,6 +1225,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
removeChatLabel,
addMessageLabel,
removeMessageLabel,
star
star,
addOrEditQuickReply,
removeQuickReply
}
}