fix: enforce content-first delivery order for WebSocket bridge stability

This commit is contained in:
stevef 2026-04-13 22:00:25 +02:00
parent 9b9796e52f
commit fd4c6711b9

View file

@ -252,7 +252,13 @@ func (c *PicoChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]stri
"content": msg.Content,
})
return nil, c.broadcastToSession(msg.ChatID, outMsg)
err := c.broadcastToSession(msg.ChatID, outMsg)
// Send typing stop after the message is delivered
stopMsg := newMessage(TypeTypingStop, nil)
_ = c.broadcastToSession(msg.ChatID, stopMsg)
return nil, err
}
// EditMessage implements channels.MessageEditor.