mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: handle default disappearing mode change notifications
This commit is contained in:
@@ -314,6 +314,22 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
case 'account_sync':
|
||||
if(child.tag === 'disappearing_mode') {
|
||||
const newDuration = +child.attrs.duration
|
||||
const timestamp = +child.attrs.t
|
||||
ev.emit('creds.update', {
|
||||
accountSettings: {
|
||||
...authState.creds.accountSettings,
|
||||
defaultDisappearingMode: {
|
||||
ephemeralExpiration: newDuration,
|
||||
ephemeralSettingTimestamp: timestamp,
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user