chore: Minor Changes to Bot Message APIs (#1739)
This commit is contained in:
parent
933661b22c
commit
f46c4b5130
4 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@ class Conversations::EventDataPresenter < SimpleDelegator
|
||||||
channel: inbox.try(:channel_type),
|
channel: inbox.try(:channel_type),
|
||||||
id: display_id,
|
id: display_id,
|
||||||
inbox_id: inbox_id,
|
inbox_id: inbox_id,
|
||||||
|
contact_inbox: contact_inbox,
|
||||||
messages: push_messages,
|
messages: push_messages,
|
||||||
meta: push_meta,
|
meta: push_meta,
|
||||||
status: status,
|
status: status,
|
||||||
|
|
|
@ -17,8 +17,10 @@ module WootMessageSeeder
|
||||||
conversation: conversation,
|
conversation: conversation,
|
||||||
message_type: :template,
|
message_type: :template,
|
||||||
content_type: 'cards',
|
content_type: 'cards',
|
||||||
|
content: 'cards',
|
||||||
content_attributes: {
|
content_attributes: {
|
||||||
items: [
|
items: [
|
||||||
|
sample_card_item,
|
||||||
sample_card_item
|
sample_card_item
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -71,6 +73,7 @@ module WootMessageSeeder
|
||||||
conversation: conversation,
|
conversation: conversation,
|
||||||
message_type: :template,
|
message_type: :template,
|
||||||
content_type: 'form',
|
content_type: 'form',
|
||||||
|
content: 'form',
|
||||||
content_attributes: {
|
content_attributes: {
|
||||||
"items": [
|
"items": [
|
||||||
{ "name": 'email', "placeholder": 'Please enter your email', "type": 'email', "label": 'Email' },
|
{ "name": 'email', "placeholder": 'Please enter your email', "type": 'email', "label": 'Email' },
|
||||||
|
|
|
@ -445,6 +445,7 @@ RSpec.describe Conversation, type: :model do
|
||||||
messages: [],
|
messages: [],
|
||||||
inbox_id: conversation.inbox_id,
|
inbox_id: conversation.inbox_id,
|
||||||
status: conversation.status,
|
status: conversation.status,
|
||||||
|
contact_inbox: conversation.contact_inbox,
|
||||||
timestamp: conversation.last_activity_at.to_i,
|
timestamp: conversation.last_activity_at.to_i,
|
||||||
can_reply: true,
|
can_reply: true,
|
||||||
channel: 'Channel::WebWidget',
|
channel: 'Channel::WebWidget',
|
||||||
|
|
|
@ -22,6 +22,7 @@ RSpec.describe Conversations::EventDataPresenter do
|
||||||
messages: [],
|
messages: [],
|
||||||
inbox_id: conversation.inbox_id,
|
inbox_id: conversation.inbox_id,
|
||||||
status: conversation.status,
|
status: conversation.status,
|
||||||
|
contact_inbox: conversation.contact_inbox,
|
||||||
can_reply: conversation.can_reply?,
|
can_reply: conversation.can_reply?,
|
||||||
channel: conversation.inbox.channel_type,
|
channel: conversation.inbox.channel_type,
|
||||||
timestamp: conversation.last_activity_at.to_i,
|
timestamp: conversation.last_activity_at.to_i,
|
||||||
|
|
Loading…
Reference in a new issue