Change internal streaming payloads to stringified IDs as well

Per
https://github.com/tootsuite/mastodon/pull/5019#issuecomment-330736452
we need these changes to send deleted status IDs as strings, not
integers.
pull/5019/head
aschmitz 7 years ago
parent 8b7e8dcba1
commit 591a9af356

@ -18,7 +18,7 @@ class BatchedRemoveStatusService < BaseService
@stream_entry_batches = []
@salmon_batches = []
@activity_json_batches = []
@json_payloads = statuses.map { |s| [s.id, Oj.dump(event: :delete, payload: s.id)] }.to_h
@json_payloads = statuses.map { |s| [s.id, Oj.dump(event: :delete, payload: s.id.to_s)] }.to_h
@activity_json = {}
@activity_xml = {}

@ -4,7 +4,7 @@ class RemoveStatusService < BaseService
include StreamEntryRenderer
def call(status)
@payload = Oj.dump(event: :delete, payload: status.id)
@payload = Oj.dump(event: :delete, payload: status.id.to_s)
@status = status
@account = status.account
@tags = status.tags.pluck(:name).to_a

Loading…
Cancel
Save