getChats method

Future getChats({
  1. bool onlyUser = false,
  2. bool onlyGroups = false,
})

get all Chats using getChats

Implementation

Future getChats({
  bool onlyUser = false,
  bool onlyGroups = false,
}) async {
  return await wpClient.evaluateJs(
    '''WPP.chat.list({
          onlyUsers: ${onlyUser.jsParse},
          onlyGroups: ${onlyGroups.jsParse}
       });''',
    methodName: "GetChats",
    forceJsonParseResult: true,
  );
}