chore: Add attachments key to message_created webhook payload (#5659)
- Add attachments key to `message_created` webhook payload
This commit is contained in:
@@ -116,7 +116,7 @@ class Message < ApplicationRecord
|
||||
end
|
||||
|
||||
def webhook_data
|
||||
{
|
||||
data = {
|
||||
account: account.webhook_data,
|
||||
additional_attributes: additional_attributes,
|
||||
content_attributes: content_attributes,
|
||||
@@ -131,6 +131,8 @@ class Message < ApplicationRecord
|
||||
sender: sender.try(:webhook_data),
|
||||
source_id: source_id
|
||||
}
|
||||
data.merge!(attachments: attachments.map(&:push_event_data)) if attachments.present?
|
||||
data
|
||||
end
|
||||
|
||||
def content
|
||||
|
||||
Reference in New Issue
Block a user