getMessage method

Future<Map> getMessage(
  1. dynamic chat_id,
  2. dynamic message_id, {
  3. required String methodName,
  4. bool is_detail = false,
  5. bool is_skip_reply_message = false,
  6. bool is_super_detail = false,
  7. required int clientId,
  8. String? extra,
  9. bool? isUseCache,
  10. Duration? durationCacheExpire,
})

getMessageDetail and convert to api: return example:

{
  "update_message": {
    "from": {
    },
    "chat": {
    },
    "text": "Hello world"
  }
}

Implementation

Future<Map> getMessage(
  dynamic chat_id,
  dynamic message_id, {
  // getMessageLocally
  required String methodName,
  bool is_detail = false,
  bool is_skip_reply_message = false,
  bool is_super_detail = false,
  required int clientId,
  String? extra,
  bool? isUseCache,
  Duration? durationCacheExpire,
}) async {
  var get_message = await invoke(
    methodName,
    parameters: {
      "chat_id": chat_id,
      "message_id": message_id,
    },
    isUseCache: isUseCache,
    durationCacheExpire: durationCacheExpire,
    clientId: clientId,
    extra: extra,
  );
  return await jsonMessage(
    get_message,
    isUseCache: isUseCache,
    durationCacheExpire: durationCacheExpire,
    is_detail: is_detail,
    is_super_detail: is_super_detail,
    is_skip_reply_message: is_skip_reply_message,
    clientId: clientId,
  );
}