fix: enforce content-first delivery order for WebSocket bridge stability
This commit is contained in:
parent
9b9796e52f
commit
fd4c6711b9
1 changed files with 7 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue