Build the IncomingMessage object from an IncomingTurn (shared by lock-conflict callback and handler path).
(turn: IncomingTurn)
| 242 | |
| 243 | /** Build the IncomingMessage object from an IncomingTurn (shared by lock-conflict callback and handler path). */ |
| 244 | function msgFromTurn(turn: IncomingTurn): IncomingMessage { |
| 245 | return { |
| 246 | text: turn.userText, |
| 247 | contentParts: turn.contentParts, |
| 248 | user: turn.user ?? { id: "" }, |
| 249 | ref: { id: "" }, |
| 250 | platform: turn.platform, |
| 251 | }; |
| 252 | } |
| 253 | |
| 254 | export function createBot< |
| 255 | TStateSchema extends StandardSchemaV1 | undefined = undefined, |
no outgoing calls
no test coverage detected
searching dependent graphs…