diff options
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 4367344ab..6ba417b3d 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -38,6 +38,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity elsif @options[:delivered_to_account_id].present? postprocess_audience_and_deliver end + + clear_unavail else raise Mastodon::RaceConditionError end @@ -48,6 +50,14 @@ class ActivityPub::Activity::Create < ActivityPub::Activity private + def clear_unavail + inboxes = [@account.inbox_url, @account.preferred_inbox_url, @account.shared_inbox_url].uniq + inboxes.each do |inbox| + Redis.current.del("exhausted_deliveries:#{inbox}") + Redis.current.srem(inbox) + end + end + def process_status @tags = [] @mentions = [] |