getGroupMessageDeliveredRecipients method

  1. @override
Future<void> getGroupMessageDeliveredRecipients(
  1. String messageId,
  2. String jid,
  3. dynamic callback(
    1. FlyResponse response
    )?
)
override

This method is used to get the message delivered users list in a group.

Implementation

@override
Future<void> getGroupMessageDeliveredRecipients(String messageId, String jid,
    Function(FlyResponse response)? callback) async {
  String? response;
  try {
    response = await mirrorFlyMethodChannel.invokeMethod(
        'getGroupMessageDeliveredToList',
        {"messageId": messageId, "jid": jid});
    callback?.call(FlyResponse(true,
        convertMessageDeliveredStatusToJson(response), FlyConstants.empty));
    // return convertMessageDeliveredStatusToJson(response);
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
        FlyException(e.code, e.message, e.details)));
  } on Exception catch (e) {
    LogMessage.d("Exception ", " $e");
    callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
        FlyException(FlyErrorCode.unHandle, FlyErrorMessage.unHandle, e)));
  }
}