feat: show rendered summary
This commit is contained in:
@@ -124,6 +124,12 @@ class Conversation < ApplicationRecord
|
||||
last_message_in_messaging_window?(messaging_window)
|
||||
end
|
||||
|
||||
def rendered_summary
|
||||
return nil if summary.nil?
|
||||
|
||||
ChatwootMarkdownRenderer.new(message_content).render_message
|
||||
end
|
||||
|
||||
def last_incoming_message
|
||||
messages&.incoming&.last
|
||||
end
|
||||
|
||||
@@ -45,6 +45,6 @@ json.unread_count conversation.unread_incoming_messages.count
|
||||
json.last_non_activity_message conversation.messages.non_activity_messages.first.try(:push_event_data)
|
||||
json.last_activity_at conversation.last_activity_at.to_i
|
||||
json.priority conversation.priority
|
||||
json.summary conversation.summary
|
||||
json.summary conversation.rendered_summary
|
||||
json.summary_generated_at conversation.summary_generated_at.to_i
|
||||
json.waiting_since conversation.waiting_since.to_i.to_i
|
||||
|
||||
Reference in New Issue
Block a user