feat(business): change profile/cover photo and manage quick replies (#1724)
This commit is contained in:
+28
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user