@wppconnect/wa-js - v4.6.0
    Preparing search index...

    Function queryWidUsernameExists

    • Query the username currently associated with a LID

      Returns undefined when the wid is not a LID or the server has no record for it. As a side effect, WhatsApp stores the result, so a subsequent ContactStore read reflects the refreshed username.

      Parameters

      • wid: Wid
      • OptionalrequestOrigin: string

      Returns Promise<
          | {
              isPhoneNumberKnown: boolean;
              oldUsername?: string;
              username?: string;
              usernameChanged: boolean;
              wasPreviouslyKnown: boolean;
          }
          | undefined,
      >