mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: incorrect group owner
This commit is contained in:
@@ -281,8 +281,12 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
switch(child?.tag) {
|
switch(child?.tag) {
|
||||||
case 'create':
|
case 'create':
|
||||||
const metadata = extractGroupMetadata(child)
|
const metadata = extractGroupMetadata(child)
|
||||||
|
|
||||||
result.messageStubType = WAMessageStubType.GROUP_CREATE
|
result.messageStubType = WAMessageStubType.GROUP_CREATE
|
||||||
result.messageStubParameters = [metadata.subject]
|
result.messageStubParameters = [metadata.subject]
|
||||||
|
result.key = {
|
||||||
|
participant: jidNormalizedUser(metadata.owner)
|
||||||
|
}
|
||||||
|
|
||||||
ev.emit('chats.upsert', [{
|
ev.emit('chats.upsert', [{
|
||||||
id: metadata.id,
|
id: metadata.id,
|
||||||
@@ -488,7 +492,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
remoteJid: node.attrs.from,
|
remoteJid: node.attrs.from,
|
||||||
fromMe,
|
fromMe,
|
||||||
participant: node.attrs.participant,
|
participant: node.attrs.participant,
|
||||||
id: node.attrs.id
|
id: node.attrs.id,
|
||||||
|
...(msg.key || {})
|
||||||
}
|
}
|
||||||
msg.messageTimestamp = +node.attrs.t
|
msg.messageTimestamp = +node.attrs.t
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user