about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
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
       {