mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-07 21:08:34 +03: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:
committed by
chengyongru
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)
|
||||
|
||||
Reference in New Issue
Block a user