feat: show rendered summary

This commit is contained in:
Shivam Mishra
2023-07-17 16:23:20 +05:30
parent b65a2f7ebd
commit 23e840dabe
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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