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
12 lines
340 B
Ruby
12 lines
340 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ChatThreadSerializer < ApplicationSerializer
|
|
has_one :original_message_user, serializer: BasicUserSerializer, embed: :objects
|
|
|
|
attributes :id, :title, :status, :original_message_id, :original_message_excerpt, :created_at
|
|
|
|
def original_message_excerpt
|
|
object.original_message.excerpt
|
|
end
|
|
end
|