mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 16:57:36 +08:00
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. |
||
|---|---|---|
| .. | ||
| admin/assets/javascripts/admin | ||
| app | ||
| assets | ||
| config | ||
| db/migrate | ||
| lib/discourse_chat_integration | ||
| spec | ||
| test/javascripts/acceptance | ||
| package.json | ||
| plugin.rb | ||
| README.md | ||
| tsconfig.json | ||
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