feat: add expiration key in group message (#1790)
* fix: improve message resend logic by adding checks for message IDs * Revert "fix: improve message resend logic by adding checks for message IDs" This reverts commit c03f9d8e6fc6cbfbb9d1f8f67c169700e704213d. * feat: add support for ephemeral message expiration in group messages * fix: lint errors
This commit is contained in:
@@ -695,6 +695,13 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
devices.push(...additionalDevices)
|
||||
}
|
||||
|
||||
if (groupData?.ephemeralDuration && groupData.ephemeralDuration > 0) {
|
||||
additionalAttributes = {
|
||||
...additionalAttributes,
|
||||
expiration: groupData.ephemeralDuration.toString()
|
||||
}
|
||||
}
|
||||
|
||||
const patched = await patchMessageBeforeSending(message)
|
||||
if (Array.isArray(patched)) {
|
||||
throw new Boom('Per-jid patching is not supported in groups')
|
||||
|
||||
Reference in New Issue
Block a user