getMessagesOfJid method

  1. @override
Future<String> getMessagesOfJid(
  1. String jid
)
override

This method is used to get the message of a JID / user.

Implementation

@override
Future<String> getMessagesOfJid(String jid) async {
  //getChatHistory
  String? chatResponse;
  try {
    chatResponse = await mirrorFlyMethodChannel
        .invokeMethod('getMessagesOfJid', {"JID": jid});
    return convertChatMessagesJsonFromString(chatResponse);
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Exception ", " $error");
    rethrow;
  }
}