From e573bb0990ece4b1a521ccf8a4c7bec5972d3538 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 30 Mar 2018 15:44:54 +0200 Subject: Fix compatibility with PeerTube (#6968) * Support fetching objects of convertible types by URL (fixes #6924) * Ignore invalid hashtags --- app/lib/activitypub/activity/create.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/lib') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index afee8a268..45c0e91cb 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -79,6 +79,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity hashtag = Tag.where(name: hashtag).first_or_initialize(name: hashtag) status.tags << hashtag + rescue ActiveRecord::RecordInvalid + nil end def process_mention(tag, status) -- cgit