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

סיכום מבוסס בינה מלאכותית

Nima1 reported two bugs in the Discourse Chat plugin: (1) the page_size parameter is ignored when fetching past messages via API, always returning 50 messages regardless of the specified size; and (2) emojis in chat thread previews render as raw shortcodes (e.g., “:wave:”) instead of graphical emojis. sam requested splitting the issues into separate topics for easier triage, and Nima1 provided links to the two newly created bug reports: Chat UI: Emojis render as shortcodes in thread previews and Chat API: page_size parameter is ignored when direction=past.

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 :wave:”).

  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 :waving_hand:”.

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!

האם תרצה לפתוח באג אחד בכל פעם, זה מקשה במיוחד על תעדוף וטיפול… עובר לתמיכה בינתיים.

אתה מוזמן לפתוח 2 נושאי באגים נפרדים.