Prefer to_json when interacting with escaping

This commit is contained in:
Matt Jankowski 2026-03-17 11:54:38 -04:00
parent 31abef8917
commit 4ad83738ed
2 changed files with 4 additions and 4 deletions

View File

@ -171,10 +171,10 @@ class FanOutOnWriteService < BaseService
end
def anonymous_payload
@anonymous_payload ||= JSON.generate({
@anonymous_payload ||= {
event: update? ? :'status.update' : :update,
payload: rendered_status,
}.as_json)
}.to_json
end
def rendered_status

View File

@ -23,10 +23,10 @@ class PushUpdateWorker
end
def message
JSON.generate({
{
event: update? ? :'status.update' : :update,
payload: @payload,
}.as_json)
}.to_json
end
def publish!