discourse/plugins/chat
Martin Brennan a51ce45508
FIX: Hashtag icon for style_type=icon not showing in rich editor (#35786)
When selecting a chat channel or a category with style_type=icon
from the hashtag autocomplete in the rich editor, the icon
was not being displayed correctly.

This was happening because when we reused the cache for hashtags
in a61009284e, it exposed an earlier
issue made in d06c60ca7c where we
override the `icon` property of the hashtag in the response
with the icon HTML.

Then, in the prosemirror hashtag extension, we would call
`hashtagTypeClass.generateIconHTML(validHashtag)`, which would
then do something like `iconHTML(hashtag.icon)`. But since
`hashtag.icon` was already the HTML, it would produce invalid HTML
similar to `<span class="d-icon-<span
class="d-icon-chat"></span>"></span>`.

This issue did not happen for style_type=emoji or style_type=square
because they had their own manual rendering methods.

The fix was to avoid overriding the `icon` property, instead storing
the icon HTML in a new property `iconHTML` in the hashtag object.
2025-11-05 16:52:38 +10:00
..
admin/assets/javascripts DEV: Remove RouteTemplate wrapper (#35414) 2025-10-27 15:38:00 +00:00
app FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
assets DEV: replace template with component arg in DAutocomplete and add UserAutocompleteResults (#35539) 2025-11-05 10:59:32 +08:00
config UX: implement refreshed reviewable for chat messages (#35812) 2025-11-05 09:13:03 +08:00
db FEATURE: Add full-text search for chat messages (#34704) 2025-10-22 11:30:35 +02:00
lib DEV: allow the "default" style button in chat message blocks (#35796) 2025-11-04 10:35:04 -05:00
public
spec FIX: Hashtag icon for style_type=icon not showing in rich editor (#35786) 2025-11-05 16:52:38 +10:00
test/javascripts DEV: Remove unneeded const self = this; from qunit tests (#35632) 2025-10-27 18:07:22 +00:00
about.json DEV: Only load specific plugin bundles during qunit test (#33678) 2025-07-21 21:00:48 +01:00
plugin.rb FEATURE: enables chat search by default (#35799) 2025-11-05 11:09:29 +10:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.