chore: update group invite docs

This commit is contained in:
Adhiraj Singh
2022-06-13 19:55:37 +05:30
parent 32fadda86a
commit 07f0ff86e8

View File

@@ -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) => {