chore: Handle attachments in Whatsapp Channel (#3299)
send and receive attachments in 360Dialog WhatsApp channels
This commit is contained in:
@@ -43,7 +43,7 @@ class Channel::Telegram < ApplicationRecord
|
||||
response = HTTParty.get("#{telegram_api_url}/getUserProfilePhotos", query: { user_id: user_id })
|
||||
return nil unless response.success?
|
||||
|
||||
photos = response.parsed_response['result']['photos']
|
||||
photos = response.parsed_response.dig('result', 'photos')
|
||||
return if photos.blank?
|
||||
|
||||
get_telegram_file_path(photos.first.last['file_id'])
|
||||
|
||||
Reference in New Issue
Block a user