Remove deprecated mb_chars method (#34039)

This commit is contained in:
Matt Jankowski 2025-03-03 11:50:57 -05:00 committed by GitHub
parent 43f616a1c8
commit d90d68bddf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 69 additions and 11 deletions

View file

@ -92,7 +92,7 @@ class BatchedRemoveStatusService < BaseService
pipeline.publish(status.local? ? 'timeline:public:local:media' : 'timeline:public:remote:media', payload)
end
status.tags.map { |tag| tag.name.mb_chars.downcase }.each do |hashtag|
status.tags.map { |tag| tag.name.downcase }.each do |hashtag|
pipeline.publish("timeline:hashtag:#{hashtag}", payload)
pipeline.publish("timeline:hashtag:#{hashtag}:local", payload) if status.local?
end

View file

@ -128,8 +128,8 @@ class FanOutOnWriteService < BaseService
def broadcast_to_hashtag_streams!
@status.tags.map(&:name).each do |hashtag|
redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}", anonymous_payload)
redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}:local", anonymous_payload) if @status.local?
redis.publish("timeline:hashtag:#{hashtag.downcase}", anonymous_payload)
redis.publish("timeline:hashtag:#{hashtag.downcase}:local", anonymous_payload) if @status.local?
end
end

View file

@ -123,8 +123,8 @@ class RemoveStatusService < BaseService
return if skip_streaming?
@status.tags.map(&:name).each do |hashtag|
redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}", @payload)
redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}:local", @payload) if @status.local?
redis.publish("timeline:hashtag:#{hashtag.downcase}", @payload)
redis.publish("timeline:hashtag:#{hashtag.downcase}:local", @payload) if @status.local?
end
end