diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index 5edea3e81..bc841fde3 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -124,7 +124,7 @@ class ForumTopic < ActiveRecord::Base end hash[id.to_s] = updated_at.to_i.to_s result = hash.to_a.flatten.join(" ") - while result.size > 3000 + while result.size > 500 ids = result.scan(/\S+/) result = ids[(ids.size / 2)..-1].join(" ") end diff --git a/test/unit/forum_topic_test.rb b/test/unit/forum_topic_test.rb index 66bd583f6..99ff55381 100644 --- a/test/unit/forum_topic_test.rb +++ b/test/unit/forum_topic_test.rb @@ -110,7 +110,7 @@ class ForumTopicTest < ActiveSupport::TestCase should "prune the string if it gets too long" do array = (1..1_000).to_a.map(&:to_s).in_groups_of(2) result = @topic.mark_as_read(array) - assert_operator result.size, :<, 3000 + assert_operator result.size, :<, 500 end end