mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-21 17:12:32 +00:00
fix(signal): join multi-line SSE data with newline per spec
Per the SSE spec, multiple data: lines within a single event must be joined with \n before parsing. signal-cli emits single-line JSON so this was latent, but the joining was wrong. Addresses review comment on PR #3852.
This commit is contained in:
parent
b647aa5f47
commit
79c23787f6
@ -557,7 +557,7 @@ class SignalChannel(BaseChannel):
|
||||
# Try to parse the accumulated data
|
||||
data_str = ""
|
||||
try:
|
||||
data_str = "".join(event_buffer)
|
||||
data_str = "\n".join(event_buffer)
|
||||
data = json.loads(data_str)
|
||||
self.logger.debug(f"SSE event parsed: {data}")
|
||||
await self._handle_receive_notification(data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user