Fix #2: Use broadcast_all for task system messages instead of broadcast_task_event
Some checks failed
Deploy Tracker / deploy (push) Failing after 4s
Some checks failed
Deploy Tracker / deploy (push) Failing after 4s
This commit is contained in:
parent
5e3ec5e7c5
commit
dc6556074e
@ -130,7 +130,7 @@ async def _system_message(
|
|||||||
|
|
||||||
await db.flush()
|
await db.flush()
|
||||||
|
|
||||||
# Build MessageOut for task comment broadcast
|
# Build MessageOut for task comment broadcast (use broadcast_message, not broadcast_task_event)
|
||||||
task_msg_out = MessageOut(
|
task_msg_out = MessageOut(
|
||||||
id=str(task_msg.id),
|
id=str(task_msg.id),
|
||||||
task_id=str(task.id),
|
task_id=str(task.id),
|
||||||
@ -142,7 +142,10 @@ async def _system_message(
|
|||||||
attachments=[],
|
attachments=[],
|
||||||
created_at=task_msg.created_at.isoformat() if task_msg.created_at else datetime.datetime.now(datetime.timezone.utc).isoformat(),
|
created_at=task_msg.created_at.isoformat() if task_msg.created_at else datetime.datetime.now(datetime.timezone.utc).isoformat(),
|
||||||
)
|
)
|
||||||
await manager.broadcast_task_event(str(task.project_id), WSEventType.MESSAGE_NEW, task_msg_out.model_dump())
|
await manager.broadcast_all(
|
||||||
|
{"type": WSEventType.MESSAGE_NEW, "data": task_msg_out.model_dump()},
|
||||||
|
exclude_slug="system",
|
||||||
|
)
|
||||||
|
|
||||||
# Broadcast chat message
|
# Broadcast chat message
|
||||||
if chat_msg and chat_id:
|
if chat_msg and chat_id:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user