Skip to content

Commit

Permalink
JSDoc enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
gekkedev authored Jun 20, 2024
1 parent a11db6c commit cb9ca8f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/api/layers/group.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class GroupLayer extends RetrieverLayer {
}

/**
* Revokes group-invite link and generate new one.
* Revokes group-invite link and generates a new one.
* @category Group
* @param chatId
* @returns Invitation link
Expand All @@ -107,10 +107,12 @@ export class GroupLayer extends RetrieverLayer {
}

/**
* Generates group-invite link
* Displays group info from an invitation link (or invitation ID)
* @category Group
* @param inviteCode
* @returns Invite code from group link. Example: CMJYfPFqRyE2GxrnkldYED
* @returns Invite code or group link. Example: CMJYfPFqRyE2GxrnkldYED
* @example getGroupInfoFromInviteLink('https://chat.whatsapp.com/invite/CMJYfPFqRyE2GxrnkldYED')
* @example getGroupInfoFromInviteLink('CMJYfPFqRyE2GxrnkldYED')
*/
public async getGroupInfoFromInviteLink(inviteCode: string) {
inviteCode = inviteCode.replace('chat.whatsapp.com/', '');
Expand Down Expand Up @@ -232,9 +234,11 @@ export class GroupLayer extends RetrieverLayer {
return participants.filter((p) => p.isAdmin).map((p) => p.id);
}
/**
* Join a group with invite code
* Join a group with an invite code or link
* @category Group
* @param inviteCode
* @example joinGroup('https://chat.whatsapp.com/invite/CMJYfPFqRyE2GxrnkldYED')
* @example joinGroup('CMJYfPFqRyE2GxrnkldYED')
*/
public async joinGroup(inviteCode: string) {
inviteCode = inviteCode.replace('chat.whatsapp.com/', '');
Expand Down

0 comments on commit cb9ca8f

Please sign in to comment.