fix(api+cli): topic post messageId is the durable historyId (v1.9.2)
Previously POST /v1/messages returned the message_queue row id as `messageId`. Topic posts ARE durable (in topic_message); the queue entry drains on delivery. Pasting that id into `--reply-to` failed because the broker validates parents against topic_message, not the queue. Now `messageId` aliases `historyId` for topic posts; both `historyId` and `queueId` remain available as explicit fields. Roadmap and CLI README updated with v0.3.1 reply-to + v0.3.2 multi-session entries.
This commit is contained in:
@@ -254,9 +254,15 @@ export const v1Router = new Hono<Env>()
|
||||
}
|
||||
}
|
||||
|
||||
// For topic posts the durable identity is the topic_message row;
|
||||
// the message_queue row is ephemeral (drains on delivery). Return
|
||||
// historyRow.id as `messageId` so callers that paste the response
|
||||
// back into `--reply-to` actually find the parent in history.
|
||||
// `historyId` and `queueId` are kept as explicit aliases.
|
||||
return c.json({
|
||||
messageId: queueRow?.id ?? null,
|
||||
messageId: historyRow?.id ?? queueRow?.id ?? null,
|
||||
historyId: historyRow?.id ?? null,
|
||||
queueId: queueRow?.id ?? null,
|
||||
topic: body.topic,
|
||||
topicId: topic.id,
|
||||
notifications,
|
||||
|
||||
Reference in New Issue
Block a user