about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-15 14:00:01 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-15 14:12:24 -0500
commitb441174bd2844c92467d94e5cee47628842bc47b (patch)
tree2e01e15ffa4f98dbcde57bff5a85b352b421359a /app
parent6b72e8a4df28a99780b590ca891b9db20a456e4e (diff)
drop incoming twitter retweets
Diffstat (limited to 'app')
-rw-r--r--app/lib/activitypub/activity/create.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 2b267c0d7..beef93e5a 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -45,6 +45,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
     @params   = {}
 
     process_status_params
+    return reject_payload! if twitter_retweet?
     process_tags
     process_audience
 
@@ -83,6 +84,10 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
     key.sub(/^http.*?\.\w+\//, '').gsub(/\H+/, '')
   end
 
+  def twitter_retweet?
+    @params[:text] =~ /^RT / || '🐦🔗:'.in?(@params[:text])
+  end
+
   def process_status_params
     @params = begin
       {