feat: add "device_fanout" flag for retry receipt

This commit is contained in:
Adhiraj Singh
2022-06-17 13:16:22 +05:30
parent 23acc1fb39
commit 399b4d3cb8

View File

@@ -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 })
}