mirror of
https://github.com/clawdbot/clawdbot.git
synced 2026-01-31 19:37:45 +01:00
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: 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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user