Merge pull request #1381 from vai-projetos/consistently-messageId

refactor(messageId): update all remaining usages to v2 format consist…
This commit is contained in:
Cassio Santos
2025-05-05 19:42:32 -03:00
committed by GitHub
3 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
import { proto } from '../../WAProto'
import { GroupMetadata, GroupParticipant, ParticipantAction, SocketConfig, WAMessageKey, WAMessageStubType } from '../Types'
import { generateMessageID, generateMessageIDV2, unixTimestampSeconds } from '../Utils'
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils'
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, jidEncode, jidNormalizedUser } from '../WABinary'
import { makeChatsSocket } from './chats'
@@ -82,7 +82,7 @@ export const makeGroupsSocket = (config: SocketConfig) => {
...sock,
groupMetadata,
groupCreate: async(subject: string, participants: string[]) => {
const key = generateMessageID()
const key = generateMessageIDV2()
const result = await groupQuery(
'@g.us',
'set',
@@ -207,7 +207,7 @@ export const makeGroupsSocket = (config: SocketConfig) => {
{
tag: 'description',
attrs: {
...(description ? { id: generateMessageID() } : { delete: 'true' }),
...(description ? { id: generateMessageIDV2() } : { delete: 'true' }),
...(prev ? { prev } : {})
},
content: description ? [