# Messages with ParentMessages not showing up in query

**URL:** <https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959>\
**Category:** Flutter\
**Tags:** chatsdk\
**Created:** [February 16, 2022, 4:41pm UTC](https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959 "2022-02-16T16:41:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Latham](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nicholas_latham/32/369_2.png) [@Nicholas\_Latham](https://community.sendbird.com/u/Nicholas_Latham)\
**Post date:** [February 16, 2022, 4:41pm UTC](https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959/1 "2022-02-16T16:41:00Z")

</div>

Hi

I am using sendbird-flutter SDK v 3.1.7.

When I use message threading and reply to a parent message, I can see the reply thread. I have tested this by loggong in on two emulators, and replying to a message sent from the first emulator in the second emulator in a thread. However, when I then do a query to load channel messages, none of the messages which have a parent message are retrieved:

The code I am using to retrieve the channel messages is:

```auto
  Future<void> loadMessages({
    int? timestamp,
    bool reload = false,
  }) async {
    if (isLoading) {
      return;
    }

    isLoading = true;

    final ts = reload ? DateTime.now().millisecondsSinceEpoch : timestamp!;
    try {

      final params = MessageListParams()
        ..includeThreadInfo = true
        ..includeReplies = true
        ..isInclusive = false
        ..includeParentMessageText = true
        ..reverse = true
        ..previousResultSize = 20;
      final messages = await channel!.getMessagesByTimestamp(ts, params);
      _messages = reload ? messages : _messages + messages;
      for(BaseMessage message in _messages) {
        print("PARENT: ${message.parentMessageId
        }, ORIGINAL: ${message.message}");
      }
      print('PARENT LAST MSG: ${channel!.lastMessage!.parentMessageId} CHANNEL MESSAGE LAST: ${channel!.lastMessage!.message}');
      hasNext = messages.length == 20;
      isLoading = false;
      if (!isDisposed) notifyListeners();
    } catch (e) {
      isLoading = false;
      print('group_channel_view.dart: getMessages: ERROR: $e');
    }
  }

```

The print statements are just to highlight the difference when channel!.lastMessage has a parent it doesn’t appear in the results of the query

---

<div class="post-metadata">

**Author:** ![Nicholas\_Latham](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nicholas_latham/32/369_2.png) [@Nicholas\_Latham](https://community.sendbird.com/u/Nicholas_Latham)\
**Post date:** [February 16, 2022, 6:15pm UTC](https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959/2 "2022-02-16T18:15:56Z")

</div>

I get similar results when querying the platform API, so it seems like it’s not only a Flutter issue?

---

<div class="post-metadata">

**Author:** ![Ian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ian/32/2077_2.png) [@Ian](https://community.sendbird.com/u/Ian)\
**Post date:** [February 16, 2022, 11:25pm UTC](https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959/4 "2022-02-16T23:25:46Z")

</div>

Hi @Nicholas_Latham,

Could you please DM me the AppID, channel\_url, message\_ts, and an example message\_id so I can look into this for you?

---

<div class="post-metadata">

**Author:** ![Ian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ian/32/2077_2.png) [@Ian](https://community.sendbird.com/u/Ian)\
**Post date:** [February 17, 2022, 10:24pm UTC](https://community.sendbird.com/t/messages-with-parentmessages-not-showing-up-in-query/3959/5 "2022-02-17T22:24:08Z")

</div>

After testing the message params, using `..replyType = ReplyType.all` instead of using `..includeReplies = true` resolved the issue. `includeReplies` has been deprecated.

The same goes for the Platform API, `include_replies` has been deprecated, and `include_reply_types` is the new parameter.

See the docs for the full list of parameters on the Platform API here: [https://sendbird.com/docs/chat/v3/platform-api/guides/message-threading#2-list-messages-along-with-their-threads](https://sendbird.com/docs/chat/v3/platform-api/guides/message-threading#2-list-messages-along-with-their-threads)
