Improved error handling.
This commit is contained in:
parent
6a59aff4b6
commit
853ca318ec
1 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ class Channel::Twitter2
|
|||
|
||||
# check if parent exists
|
||||
user = nil, ticket = nil, article = nil
|
||||
if tweet.respond_to?('in_reply_to_status_id') && tweet.in_reply_to_status_id
|
||||
if tweet.respond_to?('in_reply_to_status_id') && tweet.in_reply_to_status_id && tweet.in_reply_to_status_id.to_s != ''
|
||||
puts 'import in_reply_tweet ' + tweet.in_reply_to_status_id.to_s
|
||||
tweet_sub = @client.status( tweet.in_reply_to_status_id )
|
||||
# puts tweet_sub.inspect
|
||||
|
@ -176,7 +176,7 @@ class Channel::Twitter2
|
|||
|
||||
# puts '+++++++++++++++++++++++++++' + tweet.inspect
|
||||
# check if ticket exists
|
||||
if tweet.respond_to?('in_reply_to_status_id') && tweet.in_reply_to_status_id
|
||||
if tweet.respond_to?('in_reply_to_status_id') && tweet.in_reply_to_status_id && tweet.in_reply_to_status_id.to_s != ''
|
||||
puts 'tweet.in_reply_to_status_id found: ' + tweet.in_reply_to_status_id.to_s
|
||||
article = Ticket::Article.where( :message_id => tweet.in_reply_to_status_id.to_s ).first
|
||||
if article
|
||||
|
|
Loading…
Reference in a new issue