This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/app/controllers/api/chat_threads_controller.rb
Martin Brennan 7e34b840ca FEATURE: Skeleton for loading threads in a side pane
This commit includes:

* Additions to message and channel serializers for threads
* New route and controller for a single thread
* JS route for thread pane
* Extremely basic thread pane component
* Additions to channel manager to deal with threads, and ChatThread JS model
* Changes to chat publisher and existing JS to get new thread ID when
  message is created
2023-02-03 17:32:08 +10:00

12 lines
277 B
Ruby

# frozen_string_literal: true
class Chat::Api::ChatThreadsController < Chat::Api
def show
render_serialized(
ChatThread.includes(:original_message, :original_message_user).find(params[:thread_id]),
ChatThreadSerializer,
root: "thread",
)
end
end