@wppconnect/wa-js - v3.17.0
    Preparing search index...

    Function getActiveChat

    • Return the current active chat

      Returns undefined | ChatModel

      The currenct active chat or undefined for none

      // Get active chat
      const chat = WPP.chat.getActiveChat();

      WPP.chat.sendTextMessage(chat.id, 'Hi');