mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-25 07:56:08 -05:00
Prefer to_json when interacting with escaping
This commit is contained in:
parent
31abef8917
commit
4ad83738ed
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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!
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user