chatThread method

Future<ChatThread?> chatThread()

Get an overview of the thread in the message (currently only supported by group messages)

Return overview of the thread

Throws A description of the exception. See ChatError

Implementation

Future<ChatThread?> chatThread() async {
  try {
    Map req = {"msgId": msgId};
    Map result = await platform_interface.Client.instance.messageManager
        .callNativeMethod(ChatMethodKeys.getChatThread, req);
    ChatError.hasErrorFromResult(result);
    if (result.containsKey(ChatMethodKeys.getChatThread)) {
      return result.getValue<ChatThread>(ChatMethodKeys.getChatThread,
          callback: (obj) => ChatThread.fromJson(obj));
    } else {
      return null;
    }
  } catch (e) {
    rethrow;
  }
}