Skip to content

Commit

Permalink
Cast latest message id to string (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdstaaij committed May 1, 2016
1 parent c1fcf92 commit 2c179df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dumpers/lib/dumper_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def msg_fresh?(msg, progress)
if msg['date'] && msg['date'] > progress.newest_date
return true
elsif msg['date'] == progress.newest_date && progress.newest_id
return true if msg['id'] && msg['id'] > progress.newest_id
return true if msg['id'] && msg['id'].to_s > progress.newest_id.to_s
end

false
Expand Down
2 changes: 1 addition & 1 deletion lib/dump_progress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def to_json(*a)
def update(msg)
if !@newest_date || (msg['date'] && msg['date'] >= @newest_date)
@newest_date = msg['date'] || @newest_date
@newest_id = msg['id'] || @newest_id
@newest_id = (msg['id'] || @newest_id).to_s
end
end

Expand Down

0 comments on commit 2c179df

Please sign in to comment.