about summary refs log tree commit diff
path: root/app/lib/activitypub/activity/create.rb
diff options
context:
space:
mode:
authorStarfall <root@starfall.blue>2019-12-29 17:53:54 -0600
committerStarfall <root@starfall.blue>2019-12-29 17:53:54 -0600
commitc0c9529df269816f52915a9802e5e30fbce9576b (patch)
tree077a7a12c69b18dafd3db3226f4beac477d0f49f /app/lib/activitypub/activity/create.rb
parent9ee65e89d547ae4a5bc0a5bdb59316ba5c061cfd (diff)
parent22daf24600d8e99e4569740ee5836d25c70c1e8b (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/lib/activitypub/activity/create.rb')
-rw-r--r--app/lib/activitypub/activity/create.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 8a12a2b08..c55cfe08e 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
@@ -167,7 +167,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
     return if tag['href'].blank?
 
     account = account_from_uri(tag['href'])
-    account = ::FetchRemoteAccountService.new.call(tag['href']) if account.nil?
+    account = ActivityPub::FetchRemoteAccountService.new.call(tag['href']) if account.nil?
 
     return if account.nil?