Tlon: format reply IDs as @ud (#1837)
This commit is contained in:
@@ -13,6 +13,7 @@ Status: unreleased.
|
|||||||
- Docs: add Render deployment guide. (#1975) Thanks @anurag.
|
- Docs: add Render deployment guide. (#1975) Thanks @anurag.
|
||||||
- Docs: credit both contributors for Control UI refresh. (#1852) Thanks @EnzeD.
|
- Docs: credit both contributors for Control UI refresh. (#1852) Thanks @EnzeD.
|
||||||
- Onboarding: add Venice API key to non-interactive flow. (#1893) Thanks @jonisjongithub.
|
- 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.
|
- 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.
|
- 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.
|
- Browser: fall back to URL matching for extension relay target resolution. (#1999) Thanks @jonit-dev.
|
||||||
|
|||||||
@@ -63,16 +63,28 @@ export async function sendGroupMessage({
|
|||||||
const story = [{ inline: [text] }];
|
const story = [{ inline: [text] }];
|
||||||
const sentAt = Date.now();
|
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 = {
|
const action = {
|
||||||
channel: {
|
channel: {
|
||||||
nest: `chat/${hostShip}/${channelName}`,
|
nest: `chat/${hostShip}/${channelName}`,
|
||||||
action: replyToId
|
action: formattedReplyId
|
||||||
? {
|
? {
|
||||||
reply: {
|
// Thread reply - needs post wrapper around reply action
|
||||||
id: replyToId,
|
// ReplyActionAdd takes Memo: {content, author, sent} - no kind/blob/meta
|
||||||
delta: {
|
post: {
|
||||||
add: {
|
reply: {
|
||||||
memo: {
|
id: formattedReplyId,
|
||||||
|
action: {
|
||||||
|
add: {
|
||||||
content: story,
|
content: story,
|
||||||
author: fromShip,
|
author: fromShip,
|
||||||
sent: sentAt,
|
sent: sentAt,
|
||||||
@@ -82,6 +94,7 @@ export async function sendGroupMessage({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
// Regular post
|
||||||
post: {
|
post: {
|
||||||
add: {
|
add: {
|
||||||
content: story,
|
content: story,
|
||||||
|
|||||||
Reference in New Issue
Block a user