# 聊天 UI：表情符号在线程预览中显示为短代码

**URL:** https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985
**Category:** UX
**Tags:** emoji, chat
**Created:** [2025年八月2日 09:51 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985 "2025-08-02T09:51:24Z")
**Posts on this page:** 5
**Page:** 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: [2025年八月2日 09:51 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985/1 "2025-08-02T09:51:24Z")

</div>

我希望报告 Discourse Chat 插件中的一个 UI 渲染错误。在聊天频道列表中，线程中最新消息的预览会显示原始表情符号短代码，而不是渲染后的表情符号。

**重现步骤：**

1. 转到任何聊天频道。
2. 创建一个新线程或回复现有线程。
3. 发送一条包含表情符号的消息（例如，“你好世界 :shaking\_hands:”）。
4. 导航回显示所有频道和线程的主聊天视图。
5. 观察该线程的消息预览。

**预期行为：** 线程的消息预览应显示完全渲染的表情符号，例如：“你好世界 🤝”。

**实际行为：** 消息预览显示未渲染的文本短代码，例如：“你好世界 :shaking\_hands:”

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2025年八月2日 11:41 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985/2 "2025-08-02T11:41:05Z")

</div>

抱歉，您是指“我的帖子”页面吗？

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/5/6/b56b6c298eb100bd31ce81871dee623ec2a978c2.png)

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2025年八月4日 03:49 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985/3 "2025-08-04T03:49:37Z")

</div>

我在线程回复中放置表情符号时无法重现，它在预览中按预期呈现：

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/b/7/9b7588fa44443776a8ce2fcc28d4b32627f66a42.png)

---

<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: [2025年八月4日 08:29 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985/4 "2025-08-04T08:29:46Z")

</div>

我的错。问题似乎在于 API 中“cooked”和“excerpt”键的表情符号使用方式存在差异。

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [2025年八月10日 22:10 UTC](https://meta.discourse.org/t/chat-ui-emojis-render-as-shortcodes-in-thread-previews/376985/5 "2025-08-10T22:10:34Z")

</div>

此主题在上次回复后 3 天自动关闭。不再允许新回复。
