|
@@ -17,7 +17,8 @@ class CommunicateFacebookJob < ApplicationJob
|
|
|
log_error(article, "Can't find ticket.preferences for Ticket.find(#{article.ticket_id})") if !ticket.preferences
|
|
|
log_error(article, "Can't find ticket.preferences['channel_id'] for Ticket.find(#{article.ticket_id})") if !ticket.preferences['channel_id']
|
|
|
channel = Channel.lookup(id: ticket.preferences['channel_id'])
|
|
|
- log_error(article, "Channel.find(#{channel.id}) isn't a twitter channel!") if !channel.options[:adapter].match?(%r{\Afacebook}i)
|
|
|
+ log_error(article, "Channel.find(#{ticket.preferences['channel_id']}) does not exist anymore!") if channel.blank?
|
|
|
+ log_error(article, "Channel.find(#{channel.id}) isn't a facebook channel!") if !channel.options[:adapter].match?(%r{\Afacebook}i)
|
|
|
|
|
|
# check source object id
|
|
|
if !ticket.preferences['channel_fb_object_id']
|