A platform for community discussion. Free, open, simple.
UX: add support for flagged chat message in reviewqueue (#21802)
chapoi5bf2dca24aef
diff --git a/app/assets/stylesheets/common/base/reviewables.scss b/app/assets/stylesheets/common/base/reviewables.scssindex f413a3056e6..849439360ef 100644--- a/app/assets/stylesheets/common/base/reviewables.scss+++ b/app/assets/stylesheets/common/base/reviewables.scss@@ -232,8 +232,9 @@color: var(--secondary);border-radius: 8px;background-color: var(--secondary-high);- &.-flagged-post {- background-color: var(--danger-medium);+ &.-flagged-post,+ &.-flagged-chat-message {+ background-color: var(--danger);}&.-queued-post,&.-queued-topic,diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 581b6d68204..d9b52114b52 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -630,6 +630,8 @@ en:title: "User"reviewable_post:title: "Post"+ reviewable_chat_message:+ title: "Flagged chat message"approval:title: "Post Needs Approval"description: "We've received your new post but it needs to be approved by a moderator before it will appear. Please be patient."diff --git a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.jsindex 1857a1b9f11..3331382cec8 100644--- a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js+++ b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js@@ -1,15 +1,14 @@import Component from "@glimmer/component";import { inject as service } from "@ember/service";import { cached } from "@glimmer/tracking";+import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";export default class ReviewableChatMessage extends Component {@service store;+ @service chatChannelsManager;@cachedget chatChannel() {- return this.store.createRecord(- "chat-channel",- this.args.reviewable.chat_channel- );+ return ChatChannel.create(this.args.reviewable.chat_channel);}}