From cb9ca8ff45edc3453954a607c03372ce0c2e1459 Mon Sep 17 00:00:00 2001 From: gekkedev <17025257+gekkedev@users.noreply.github.com> Date: Thu, 20 Jun 2024 03:00:54 +0200 Subject: [PATCH] JSDoc enhancement --- src/api/layers/group.layer.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/api/layers/group.layer.ts b/src/api/layers/group.layer.ts index 9c8196667..f3526b84d 100644 --- a/src/api/layers/group.layer.ts +++ b/src/api/layers/group.layer.ts @@ -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 @@ -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/', ''); @@ -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/', '');