Merge pull request #128 from kmycode/kb-connect-7.2-to-development
Connect `kb_patch` to `kb_development`
This commit is contained in:
commit
c042987026
3 changed files with 11 additions and 2 deletions
|
@ -103,7 +103,12 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
|
||||||
return if custom_emoji_parser.shortcode.blank? || custom_emoji_parser.image_remote_url.blank?
|
return if custom_emoji_parser.shortcode.blank? || custom_emoji_parser.image_remote_url.blank?
|
||||||
|
|
||||||
domain = tag['domain'] || URI.split(custom_emoji_parser.uri)[2] || @account.domain
|
domain = tag['domain'] || URI.split(custom_emoji_parser.uri)[2] || @account.domain
|
||||||
domain = nil if domain == Rails.configuration.x.local_domain || domain == Rails.configuration.x.web_domain
|
|
||||||
|
if domain == Rails.configuration.x.local_domain || domain == Rails.configuration.x.web_domain
|
||||||
|
# Block overwriting remote-but-local data
|
||||||
|
return CustomEmoji.find_by(shortcode: custom_emoji_parser.shortcode, domain: nil)
|
||||||
|
end
|
||||||
|
|
||||||
return if domain.present? && skip_download?(domain)
|
return if domain.present? && skip_download?(domain)
|
||||||
|
|
||||||
emoji = CustomEmoji.find_by(shortcode: custom_emoji_parser.shortcode, domain: domain)
|
emoji = CustomEmoji.find_by(shortcode: custom_emoji_parser.shortcode, domain: domain)
|
||||||
|
|
|
@ -9,7 +9,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_minor
|
def kmyblue_minor
|
||||||
1
|
2
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_flag
|
def kmyblue_flag
|
||||||
|
|
|
@ -185,6 +185,10 @@ RSpec.describe ActivityPub::Activity::Like do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
|
Fabricate(:custom_emoji, domain: nil, shortcode: 'tinking', license: 'Everyone but Ohagi')
|
||||||
|
end
|
||||||
|
|
||||||
it 'create emoji reaction' do
|
it 'create emoji reaction' do
|
||||||
expect(subject.count).to eq 1
|
expect(subject.count).to eq 1
|
||||||
expect(subject.first.name).to eq 'tinking'
|
expect(subject.first.name).to eq 'tinking'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue