deleteMessages method

  1. @override
Future deleteMessages(
  1. String jid,
  2. List<String> messageIds,
  3. bool isDeleteForEveryOne
)
override

Implementation

@override
Future<dynamic> deleteMessages(String jid, List<String> messageIds, bool isDeleteForEveryOne) async {
  dynamic messageDeleteResponse;
  try {
    messageDeleteResponse = await mirrorFlyMethodChannel.invokeMethod(
        'delete_messages', {"jid": jid, "chat_type": "chat", "message_ids": messageIds, "is_delete_for_everyone": isDeleteForEveryOne});
    LogMessage.d("Message Delete Response ", " $messageDeleteResponse");
    return messageDeleteResponse;
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Exception ", " $error");
    rethrow;
  }
}