Skip to content

Commit

Permalink
Optimization for reply-by-tweet publiclab#4962
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored and icarito committed Apr 9, 2019
1 parent 1320334 commit e434fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def self.get_node_from_urls_present(urls)
end

def self.find_email(twitter_user_name)
UserTag.all.each do |user_tag|
UserTag.where('value LIKE (?)', 'oauth:twitter%').where.not(data: nil).each do |user_tag|
data = user_tag["data"]
if !data.nil? && !data["info"].nil? && !data["info"]["nickname"].nil? && data["info"]["nickname"].to_s == twitter_user_name
return data["info"]["email"]
Expand Down

0 comments on commit e434fbf

Please sign in to comment.