# Last message in chat

**URL:** <https://forum.social.plus/t/last-message-in-chat/1318>\
**Category:** TS SDK\
**Created:** [May 28, 2024, 10:21am UTC](https://forum.social.plus/t/last-message-in-chat/1318 "2024-05-28T10:21:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ehab\_Abdelhameed](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Ehab\_Abdelhameed](https://forum.social.plus/u/Ehab_Abdelhameed)\
**Post date:** [May 28, 2024, 10:21am UTC](https://forum.social.plus/t/last-message-in-chat/1318/1 "2024-05-28T10:21:31Z")

</div>

how to get last message in chat

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [May 28, 2024, 11:10am UTC](https://forum.social.plus/t/last-message-in-chat/1318/2 "2024-05-28T11:10:38Z")

</div>

Hello, you can query last messages by applying the _lastCreated_ sort order.

For more details, please refer to the documentation: [https://docs.amity.co/amity-sdk/chat/messaging/query-and-filter-messages](https://docs.amity.co/amity-sdk/chat/messaging/query-and-filter-messages)

Please let us know if this isn’t what you were looking for.
