mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add "device_fanout" flag for retry receipt
This commit is contained in:
@@ -306,6 +306,13 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
|
||||
const devices: JidWithDevice[] = []
|
||||
if(participant) {
|
||||
// when the retry request is not for a group
|
||||
// only send to the specific device that asked for a retry
|
||||
// otherwise the message is sent out to every device that should be a recipient
|
||||
if(!isGroup) {
|
||||
additionalAttributes = { ...additionalAttributes, device_fanout: 'false' }
|
||||
}
|
||||
|
||||
const { user, device } = jidDecode(participant)
|
||||
devices.push({ user, device })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user