diff options
author | ThibG <thib@sitedethib.com> | 2019-12-17 13:31:56 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-12-17 13:31:56 +0100 |
commit | da2143b3089ec16fca449b97acbfb65acfe92197 (patch) | |
tree | efce61c5a3092442d477bc555fe1f63becbc52d6 /app/lib/activitypub | |
parent | 3830c0b74168070cdd410d311ba85a3b323bca9f (diff) |
Fixes featured hashtag setting page erroring out instead of rejecting invalid tags (#12436)
* Revert "Fix ignoring whole status because of one invalid hashtag (#11621)" This reverts commit dff46b260b2f7d765d254c84a4b89105c7de5e97. * Fix statuses being rejected because of invalid hashtag names * Add spec for invalid hashtag names in statuses * Add test for featured tags controller
Diffstat (limited to 'app/lib/activitypub')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 8a12a2b08..756d5cb1c 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -157,7 +157,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity return if tag['name'].blank? Tag.find_or_create_by_names(tag['name']) do |hashtag| - @tags << hashtag unless @tags.include?(hashtag) + @tags << hashtag unless @tags.include?(hashtag) || !hashtag.valid? end rescue ActiveRecord::RecordInvalid nil |