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

Conflicts:
- `app/javascript/mastodon/features/compose/components/poll_form.js`:
  glitch-soc change because of having changed the default number of
  available poll options.
  Applied upstream's changes while keeping glitch-soc's default number of
  poll options.
- `public/oops.png`:
  We had a minor graphics change, probably not worth diverging from upstream.
  Took upstream version.
This commit is contained in:
Claire
2022-11-06 09:50:41 +01:00
503 changed files with 8593 additions and 4058 deletions

View File

@@ -14,6 +14,7 @@ class FanOutOnWriteService < BaseService
@options = options
check_race_condition!
warm_payload_cache!
fan_out_to_local_recipients!
fan_out_to_public_recipients! if broadcastable?
@@ -143,13 +144,21 @@ class FanOutOnWriteService < BaseService
AccountConversation.add_status(@account, @status) unless update?
end
def warm_payload_cache!
Rails.cache.write("fan-out/#{@status.id}", rendered_status)
end
def anonymous_payload
@anonymous_payload ||= Oj.dump(
event: update? ? :'status.update' : :update,
payload: InlineRenderer.render(@status, nil, :status)
payload: rendered_status
)
end
def rendered_status
@rendered_status ||= InlineRenderer.render(@status, nil, :status)
end
def update?
@options[:update]
end