DEV: Review fixes

This commit is contained in:
Martin Brennan 2023-02-13 10:40:14 +10:00
parent 176070cd78
commit dd9059917f
No known key found for this signature in database
GPG Key ID: A08063EEF3EA26A4
2 changed files with 2 additions and 4 deletions

View File

@ -12,9 +12,7 @@ class Chat::Api::ChatChannelThreadsController < Chat::Api
.includes(:channel)
.includes(original_message_user: :user_status)
.includes(original_message: :chat_webhook_event)
.find(params[:thread_id])
raise Discourse::NotFound if thread.channel_id != params[:channel_id].to_i
.find_by!(id: params[:thread_id], channel_id: params[:channel_id])
guardian.ensure_can_preview_chat_channel!(thread.channel)

View File

@ -9,7 +9,7 @@ export default class ChatChannelThread extends DiscourseRoute {
async model(params) {
return this.chatThreadsManager.find(
this.chat.activeChannel.id,
this.modelFor("chat.channel").id,
params.threadId
);
}