Added method to revokes link of group chat (#421)

This commit is contained in:
Ibnu syawal
2021-03-28 14:39:55 +00:00
committed by GitHub
parent 7e79b88c78
commit b1ea0e31da
2 changed files with 10 additions and 0 deletions

View File

@@ -527,6 +527,11 @@ Of course, replace ``` xyz ``` with an actual ID.
console.log("joined to: " + response.gid)
```
Of course, replace ``` xxx ``` with invitation code.
- To revokes the current invite link of a group
``` ts
const response = await conn.revokeInvite ("abcd-xyz@g.us")
console.log("new group code: " + response.code)
```
## Broadcast Lists & Stories

View File

@@ -182,4 +182,9 @@ export class WAConnection extends Base {
const response = await this.query({ json: ['action', 'invite', jid], expect200: true })
return response
}
/** Revokes the current invite link for a group chat */
async revokeInvite(jid) {
const response = await this.query({ json: ['action', 'inviteReset', jid], expect200: true })
return response
}
}