Tlon: format reply IDs as @ud (#1837)

This commit is contained in:
Shadow
2026-01-25 22:30:18 -06:00
parent 5d6a9da370
commit 5172098073
2 changed files with 20 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ Status: unreleased.
- Docs: add Render deployment guide. (#1975) Thanks @anurag.
- Docs: credit both contributors for Control UI refresh. (#1852) Thanks @EnzeD.
- Onboarding: add Venice API key to non-interactive flow. (#1893) Thanks @jonisjongithub.
- Tlon: format thread reply IDs as @ud. (#1837) Thanks @wca4a.
- CI: increase Node heap size for macOS checks. (#1890) Thanks @realZachi.
- macOS: avoid crash when rendering code blocks by bumping Textual to 0.3.1. (#2033) Thanks @garricn.
- Browser: fall back to URL matching for extension relay target resolution. (#1999) Thanks @jonit-dev.

View File

@@ -63,16 +63,28 @@ export async function sendGroupMessage({
const story = [{ inline: [text] }];
const sentAt = Date.now();
// Format reply ID as @ud (with dots) - required for Tlon to recognize thread replies
let formattedReplyId = replyToId;
if (replyToId && /^\d+$/.test(replyToId)) {
try {
formattedReplyId = formatUd(BigInt(replyToId));
} catch {
// Fall back to raw ID if formatting fails
}
}
const action = {
channel: {
nest: `chat/${hostShip}/${channelName}`,
action: replyToId
action: formattedReplyId
? {
reply: {
id: replyToId,
delta: {
add: {
memo: {
// Thread reply - needs post wrapper around reply action
// ReplyActionAdd takes Memo: {content, author, sent} - no kind/blob/meta
post: {
reply: {
id: formattedReplyId,
action: {
add: {
content: story,
author: fromShip,
sent: sentAt,
@@ -82,6 +94,7 @@ export async function sendGroupMessage({
},
}
: {
// Regular post
post: {
add: {
content: story,