From 9909c743d40a8119c6aebe2e813c7e8c5fa7ed8c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 23 Mar 2026 12:11:31 -0400 Subject: [PATCH] Use `matches_uri_prefix` in followers hash method (#38332) --- app/models/concerns/account/interactions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/account/interactions.rb b/app/models/concerns/account/interactions.rb index 7020491f42..308bd4c9a7 100644 --- a/app/models/concerns/account/interactions.rb +++ b/app/models/concerns/account/interactions.rb @@ -231,7 +231,7 @@ module Account::Interactions Rails.cache.fetch("followers_hash:#{id}:#{url_prefix}/") do digest = "\x00" * 32 - followers.where(Account.arel_table[:uri].matches("#{Account.sanitize_sql_like(url_prefix)}/%", false, true)).or(followers.where(uri: url_prefix)).pluck_each(:uri) do |uri| + followers.matches_uri_prefix(url_prefix).pluck_each(:uri) do |uri| Xorcist.xor!(digest, Digest::SHA256.digest(uri)) end digest.unpack1('H*')