diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-12 04:38:56 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-12 04:38:56 -0600 |
commit | a8713ee8b73ef63dab45c3c4db949dbfc49a6381 (patch) | |
tree | 51bc07def409119d246bbbcf4e123ebc0572470a /app/lib/activitypub/activity | |
parent | 90373b7f3190e86882e764d9cf595f7345a97245 (diff) |
add ability for post authors to kick jerks out of their threads
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 1839a649e..b82bfec21 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -66,7 +66,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity @mentions_local_account = false process_status_params - return reject_payload! if twitter_retweet? || recipient_rejects_replies? + return reject_payload! if twitter_retweet? || recipient_rejects_replies? || kicked? process_tags process_audience @@ -109,6 +109,11 @@ class ActivityPub::Activity::Create < ActivityPub::Activity @params[:thread]&.account_id != @account.id end + def kicked? + @params[:conversation].present? && + @params[:conversation].kicks.where(account_id: @account.id).exists? + end + def process_status_params @params = begin { |