Ignore invalid hashtags on remote statuses instead of rejecting them (#9118)

Fixes #9115
lolsob-rspec
ThibG 2018-10-26 22:48:35 +02:00 committed by Eugen Rochko
parent 56774d3bd4
commit e169e36810
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
return if tag['name'].blank? return if tag['name'].blank?
hashtag = tag['name'].gsub(/\A#/, '').mb_chars.downcase hashtag = tag['name'].gsub(/\A#/, '').mb_chars.downcase
hashtag = Tag.where(name: hashtag).first_or_create(name: hashtag) hashtag = Tag.where(name: hashtag).first_or_create!(name: hashtag)
return if @tags.include?(hashtag) return if @tags.include?(hashtag)