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:
parent
a8644ccb3e
commit
61c56d4fd3
@ -436,15 +436,6 @@ class Status < ApplicationRecord
|
|||||||
end
|
end
|
||||||
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
|
def status_stat
|
||||||
super || build_status_stat
|
super || build_status_stat
|
||||||
end
|
end
|
||||||
@ -499,7 +490,7 @@ class Status < ApplicationRecord
|
|||||||
if reblog?
|
if reblog?
|
||||||
self.local_only = reblog.local_only
|
self.local_only = reblog.local_only
|
||||||
elsif local_only.nil?
|
elsif local_only.nil?
|
||||||
self.local_only = marked_local_only?
|
self.local_only = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -246,7 +246,7 @@ RSpec.describe Status do
|
|||||||
|
|
||||||
describe 'on a status that ends with the local-only emoji' do
|
describe 'on a status that ends with the local-only emoji' do
|
||||||
before do
|
before do
|
||||||
subject.text = "A toot #{subject.local_only_emoji}"
|
subject.text = 'A toot 👁'
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the status originates from this instance' do
|
context 'when the status originates from this instance' do
|
||||||
@ -254,10 +254,10 @@ RSpec.describe Status do
|
|||||||
subject.account = local_account
|
subject.account = local_account
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'is marked local-only' do
|
it 'is not marked local-only' do
|
||||||
subject.save!
|
subject.save!
|
||||||
|
|
||||||
expect(subject).to be_local_only
|
expect(subject).to_not be_local_only
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user