# באגים בתוסף הצ'אט: page\_size מתעלם מהודעות קודמות ובעיית רינדור אימוג'י

**URL:** <https://meta.discourse.org/t/chat-plugin-bugs-page-size-ignored-for-past-messages-emoji-rendering-issue/376424>\
**Category:** Product Support\
**Tags:** chat\
**Created:** [29 ביולי,‏ 2025,‏ 2:20pm UTC](https://meta.discourse.org/t/chat-plugin-bugs-page-size-ignored-for-past-messages-emoji-rendering-issue/376424 "2025-07-29T14:20:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Nima1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nima1/32/299628_2.png) [@Nima1](https://meta.discourse.org/u/Nima1)\
**Post date:** [29 ביולי,‏ 2025,‏ 2:20pm UTC](https://meta.discourse.org/t/chat-plugin-bugs-page-size-ignored-for-past-messages-emoji-rendering-issue/376424/1 "2025-07-29T14:20:02Z")

</div>

I’d like to report two separate bugs I’ve encountered with the **Discourse Chat** plugin.

* * *

### 1. API: `page_size` is ignored when `direction=past`

When querying for chat messages via the API, the `page_size` parameter does not work as expected when fetching older messages. It always returns the maximum of 50 items, regardless of the specified size.

Steps to Reproduce:

Make an API call to the chat messages endpoint with the following parameters:

- `target_message_id`: [ID of the last message you see]

- `direction`: `past`

- `page_size`: `5` (or any number less than 50)

Expected Behavior:

The API should return a JSON object containing a maximum of 5 messages that were sent before the target\_message\_id.

Actual Behavior:

The API returns 50 messages, ignoring the page\_size=5 parameter. It seems to be hardcoded to the maximum page size in this specific scenario.

* * *

### 2. UI: Emojis render incorrectly in chat thread previews

In the chat channel list, the preview of the latest message in a thread does not render emojis correctly. Instead of displaying the graphical emoji, it shows the raw emoji shortcode.

**Steps to Reproduce:**

1. Go to a chat channel.

2. Create a new thread or reply to an existing one.

3. Send a message that contains an emoji (e.g., “Hello world 👋”).

4. Navigate back to the main chat view where all channels and threads are listed.

Expected Behavior:

The message preview for that thread should display the rendered emoji, like: “Hello world 👋”.

Actual Behavior:

The message preview shows the un-rendered text shortcode: “Hello world :shaking-hand:”.

* * *

Thanks for your great work on Discourse and for looking into these issues!

---

_[View the full topic](https://meta.discourse.org/t/chat-plugin-bugs-page-size-ignored-for-past-messages-emoji-rendering-issue/376424)._
