mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 12:37:56 +00:00
chore: Minor Changes to Bot Message APIs (#1739)
This commit is contained in:
@@ -10,6 +10,7 @@ class Conversations::EventDataPresenter < SimpleDelegator
|
||||
channel: inbox.try(:channel_type),
|
||||
id: display_id,
|
||||
inbox_id: inbox_id,
|
||||
contact_inbox: contact_inbox,
|
||||
messages: push_messages,
|
||||
meta: push_meta,
|
||||
status: status,
|
||||
|
||||
@@ -17,8 +17,10 @@ module WootMessageSeeder
|
||||
conversation: conversation,
|
||||
message_type: :template,
|
||||
content_type: 'cards',
|
||||
content: 'cards',
|
||||
content_attributes: {
|
||||
items: [
|
||||
sample_card_item,
|
||||
sample_card_item
|
||||
]
|
||||
}
|
||||
@@ -71,6 +73,7 @@ module WootMessageSeeder
|
||||
conversation: conversation,
|
||||
message_type: :template,
|
||||
content_type: 'form',
|
||||
content: 'form',
|
||||
content_attributes: {
|
||||
"items": [
|
||||
{ "name": 'email', "placeholder": 'Please enter your email', "type": 'email', "label": 'Email' },
|
||||
|
||||
@@ -445,6 +445,7 @@ RSpec.describe Conversation, type: :model do
|
||||
messages: [],
|
||||
inbox_id: conversation.inbox_id,
|
||||
status: conversation.status,
|
||||
contact_inbox: conversation.contact_inbox,
|
||||
timestamp: conversation.last_activity_at.to_i,
|
||||
can_reply: true,
|
||||
channel: 'Channel::WebWidget',
|
||||
|
||||
@@ -22,6 +22,7 @@ RSpec.describe Conversations::EventDataPresenter do
|
||||
messages: [],
|
||||
inbox_id: conversation.inbox_id,
|
||||
status: conversation.status,
|
||||
contact_inbox: conversation.contact_inbox,
|
||||
can_reply: conversation.can_reply?,
|
||||
channel: conversation.inbox.channel_type,
|
||||
timestamp: conversation.last_activity_at.to_i,
|
||||
|
||||
Reference in New Issue
Block a user