Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `README.md`:
  Discarded upstream changes: we have our own README
- `app/controllers/follower_accounts_controller.rb`:
  Port upstream's minor refactoring
This commit is contained in:
Claire
2022-12-15 20:25:25 +01:00
103 changed files with 1228 additions and 274 deletions

View File

@@ -37,12 +37,15 @@ class PostStatusService < BaseService
schedule_status!
else
process_status!
postprocess_status!
bump_potential_friendship!
end
redis.setex(idempotency_key, 3_600, @status.id) if idempotency_given?
unless scheduled?
postprocess_status!
bump_potential_friendship!
end
@status
end
@@ -75,9 +78,6 @@ class PostStatusService < BaseService
ApplicationRecord.transaction do
@status = @account.statuses.create!(status_attributes)
end
process_hashtags_service.call(@status)
process_mentions_service.call(@status)
end
def schedule_status!
@@ -101,6 +101,8 @@ class PostStatusService < BaseService
end
def postprocess_status!
process_hashtags_service.call(@status)
process_mentions_service.call(@status)
Trends.tags.register(@status)
LinkCrawlWorker.perform_async(@status.id)
DistributionWorker.perform_async(@status.id)