resendInRoomMessage method

Future<bool> resendInRoomMessage(
  1. ZegoInRoomMessage message, {
  2. ZegoInRoomMessageType type = ZegoInRoomMessageType.broadcastMessage,
})

re-send in-room message

Implementation

Future<bool> resendInRoomMessage(
  ZegoInRoomMessage message, {
  ZegoInRoomMessageType type = ZegoInRoomMessageType.broadcastMessage,
}) async {
  final resultErrorCode = await ZegoUIKitCore.shared.message.resendMessage(
    message,
    type,
  );

  if (ZegoUIKitErrorCode.success != resultErrorCode) {
    ZegoUIKitCore.shared.error.errorStreamCtrl?.add(
      ZegoUIKitError(
        code: ZegoUIKitErrorCode.messageReSendError,
        message: 'resend in-room message error:$resultErrorCode, '
            'message:$message, '
            '${ZegoUIKitErrorCode.expressErrorCodeDocumentTips}',
        method: 'sendInRoomCommand',
      ),
    );
  }

  return ZegoErrorCode.CommonSuccess == resultErrorCode;
}