Merge pull request #3486 from ClearlyClaire/glitch-soc/drop-local-emoji

Completely drop support for the infamous local-only emoji
This commit is contained in:
Claire 2026-06-12 19:16:32 +02:00 committed by GitHub
parent a8644ccb3e
commit 61c56d4fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 13 deletions

View File

@ -436,15 +436,6 @@ class Status < ApplicationRecord
end
end
def marked_local_only?
# match both with and without U+FE0F (the emoji variation selector)
/#{local_only_emoji}\ufe0f?\z/.match?(content)
end
def local_only_emoji
'👁'
end
def status_stat
super || build_status_stat
end
@ -499,7 +490,7 @@ class Status < ApplicationRecord
if reblog?
self.local_only = reblog.local_only
elsif local_only.nil?
self.local_only = marked_local_only?
self.local_only = false
end
end

View File

@ -246,7 +246,7 @@ RSpec.describe Status do
describe 'on a status that ends with the local-only emoji' do
before do
subject.text = "A toot #{subject.local_only_emoji}"
subject.text = 'A toot 👁'
end
context 'when the status originates from this instance' do
@ -254,10 +254,10 @@ RSpec.describe Status do
subject.account = local_account
end
it 'is marked local-only' do
it 'is not marked local-only' do
subject.save!
expect(subject).to be_local_only
expect(subject).to_not be_local_only
end
end