0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 16:57:36 +08:00
discourse/plugins/discourse-chat-integration
Krzysztof Kotlarek 45538c7c11
DEV: Handle both string and object tag formats (#37207)
What is the problem?

PR discourse/discourse#36678 changes tags from an array of strings to an
array of tag objects. The chat-integration plugin's rule editing and
display functionality will break when tags become objects instead of
strings:
- The `EditRule` modal directly mutates `rule.tags` with the tag chooser
output
- The `RuleRow` component displays `rule.tags` directly in the template

What is the solution?

Update both components to handle both formats:
- Add `onTagsChanged` handler in `EditRule` that normalizes tags to
strings using `typeof t === "string" ? t : t.name`
- Add `displayTags` getter in `RuleRow` that converts tags to strings
before display
- Add system spec to verify tag editing works correctly

This is the same backwards-compatible approach used in Discourse core.
2026-01-21 08:43:32 +08:00
..
admin/assets/javascripts/admin DEV: Handle both string and object tag formats (#37207) 2026-01-21 08:43:32 +08:00
app DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
assets UX: add admin sidebar icons for preinstalled plugins (#36764) 2025-12-18 16:39:00 -05:00
config I18N: Update translations (#37210) 2026-01-20 11:58:39 +01:00
db/migrate
lib/discourse_chat_integration DEV: Fix random typos (#36505) 2025-12-08 11:33:19 +01:00
spec DEV: Handle both string and object tag formats (#37207) 2026-01-21 08:43:32 +08:00
test/javascripts/acceptance
package.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00
plugin.rb DEV: Remove obsolete register_svg_icon checks (#35067) 2025-09-30 15:51:44 +02:00
README.md
tsconfig.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00

Chat Integration Plugin

Integrate your chat system of choice with Discourse.

For more information, please see: https://meta.discourse.org/t/chatroom-integration-plugin-discourse-chat-integration/66522