Permalink
Browse files

session[:bakusoku]

  • Loading branch information...
sorah committed Oct 22, 2017
1 parent 6891329 commit 7b4f5cf6d822c9a6607a9e729e5ad01b1cdfbbd8
Showing with 5 additions and 1 deletion.
  1. +5 −1 isubata/webapp/ruby/app.rb
@@ -252,6 +252,8 @@ def user
max_message_id = rows.empty? ? 0 : rows.map { |row| row['id'] }.max
redis.hset(redis_key_lastreads(user_id), channel_id, max_message_id)
session[:bakusoku] = true
content_type :json
response.to_json
end
@@ -262,7 +264,9 @@ def user
return 403
end
AwesomeFetch.instance.wait
unless session.delete(:bakusoku)
AwesomeFetch.instance.wait
end
rs = redis.hgetall(redis_key_total_messages)

0 comments on commit 7b4f5cf

Please sign in to comment.