Browse Source

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

Fixes #9115
pull/4/head
ThibG 6 years ago
committed by Eugen Rochko
parent
commit
e53cc673e7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/lib/activitypub/activity/create.rb

+ 1
- 1
app/lib/activitypub/activity/create.rb View File

@ -129,7 +129,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
return if tag['name'].blank?
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)

Loading…
Cancel
Save