mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: Add notification group: change inviteCode
This commit is contained in:
committed by
Adhiraj Singh
parent
7923233829
commit
704aa1e434
@@ -254,7 +254,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_RESTRICT
|
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_RESTRICT
|
||||||
msg.messageStubParameters = [ (child.tag === 'locked') ? 'on' : 'off' ]
|
msg.messageStubParameters = [ (child.tag === 'locked') ? 'on' : 'off' ]
|
||||||
break
|
break
|
||||||
|
case 'invite':
|
||||||
|
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_INVITE_LINK
|
||||||
|
msg.messageStubParameters = [ child.attrs.code ]
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export interface GroupMetadata {
|
|||||||
// Baileys modified array
|
// Baileys modified array
|
||||||
participants: GroupParticipant[]
|
participants: GroupParticipant[]
|
||||||
ephemeralDuration?: number
|
ephemeralDuration?: number
|
||||||
|
inviteCode?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -252,6 +252,10 @@ const processMessage = async(
|
|||||||
chat.name = name
|
chat.name = name
|
||||||
emitGroupUpdate({ subject: name })
|
emitGroupUpdate({ subject: name })
|
||||||
break
|
break
|
||||||
|
case WAMessageStubType.GROUP_CHANGE_INVITE_LINK:
|
||||||
|
const code = message.messageStubParameters?.[0]
|
||||||
|
emitGroupUpdate({ inviteCode: code })
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user