feat: eventMessage sending / call link creation (#1677)

This commit is contained in:
vini
2025-09-07 08:08:18 -03:00
committed by GitHub
parent 4d4339dae6
commit 084761dc31
5 changed files with 76 additions and 1 deletions
+13
View File
@@ -655,6 +655,10 @@ export const makeMessagesSocket = (config: SocketConfig) => {
return 'poll'
}
if (message.eventMessage) {
return 'event'
}
return 'text'
}
@@ -817,12 +821,14 @@ export const makeMessagesSocket = (config: SocketConfig) => {
}),
//TODO: CACHE
getProfilePicUrl: sock.profilePictureUrl,
getCallLink: sock.createCallLink,
upload: waUploadToServer,
mediaCache: config.mediaCache,
options: config.options,
messageId: generateMessageIDV2(sock.user?.id),
...options
})
const isEventMsg = 'event' in content && !!content.event
const isDeleteMsg = 'delete' in content && !!content.delete
const isEditMsg = 'edit' in content && !!content.edit
const isPinMsg = 'pin' in content && !!content.pin
@@ -848,6 +854,13 @@ export const makeMessagesSocket = (config: SocketConfig) => {
polltype: 'creation'
}
} as BinaryNode)
} else if (isEventMsg) {
additionalNodes.push({
tag: 'meta',
attrs: {
event_type: 'creation'
}
} as BinaryNode)
}
if ('cachedGroupMetadata' in options) {