mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: update group invite docs
This commit is contained in:
@@ -137,11 +137,20 @@ export const makeGroupsSocket = (config: SocketConfig) => {
|
|||||||
const result = getBinaryNodeChild(results, 'group')
|
const result = getBinaryNodeChild(results, 'group')
|
||||||
return result.attrs.jid
|
return result.attrs.jid
|
||||||
},
|
},
|
||||||
groupAcceptInviteV4: async(jid: string, inviteMessage: proto.IGroupInviteMessage) => {
|
/**
|
||||||
const results = await groupQuery(inviteMessage.groupJid, 'set', [{ tag: 'accept', attrs: {
|
* accept a GroupInviteMessage
|
||||||
code: inviteMessage.inviteCode,
|
* @param senderJid jid of the person that sent the message
|
||||||
expiration: inviteMessage.inviteExpiration.toString(),
|
* @param inviteMessage the message to accept
|
||||||
admin: jid } }])
|
*/
|
||||||
|
groupAcceptInviteV4: async(senderJid: string, inviteMessage: proto.IGroupInviteMessage) => {
|
||||||
|
const results = await groupQuery(inviteMessage.groupJid, 'set', [{
|
||||||
|
tag: 'accept',
|
||||||
|
attrs: {
|
||||||
|
code: inviteMessage.inviteCode,
|
||||||
|
expiration: inviteMessage.inviteExpiration.toString(),
|
||||||
|
admin: senderJid
|
||||||
|
}
|
||||||
|
}])
|
||||||
return results.attrs.from
|
return results.attrs.from
|
||||||
},
|
},
|
||||||
groupToggleEphemeral: async(jid: string, ephemeralExpiration: number) => {
|
groupToggleEphemeral: async(jid: string, ephemeralExpiration: number) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user