changeset 163:ed73d92c7113

Whoops no id_str and wrong logic
author nanaya <me@nanaya.pro>
date Fri, 03 Aug 2018 02:12:41 +0900
parents 3ff631612493
children 59a4645fd24c
files app/models/tweet.rb
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/models/tweet.rb	Fri Aug 03 02:03:21 2018 +0900
+++ b/app/models/tweet.rb	Fri Aug 03 02:12:41 2018 +0900
@@ -52,7 +52,7 @@
           if data[:result] == :ok
             user = data[:data]
 
-            if user.id_str != @twitter_id || user.screen_name != @twitter_id
+            if user.id.to_s != @twitter_id && user.screen_name != @twitter_id
               throw "Wrong user data. Requested: #{@twitter_id}, got: #{user.id} (#{user.screen_name.printable})"
             end
           end