feat: restore Truth Social support - #100
Conversation
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
embedly-docs | 5d07e6e | Commit Preview URL Branch Preview URL |
Sep 09 2026, 06:06 AM |
Greptile SummaryThis PR restores Truth Social URL matching and status retrieval through its authenticated API, normalizes posts and attachments, forwards the worker access token, and adjusts the bot’s display label.
Confidence Score: 4/5The PR appears safe to merge after addressing the non-blocking broken platform emoji in Truth Social embed footers. Core matching, registration, token forwarding, and transformation paths are coherent, but every Truth Social footer requests a custom emoji for which the bot has no synchronized asset. Files Needing Attention: apps/bot/src/lib/builder.ts
|
| Filename | Overview |
|---|---|
| packages/platforms/src/platforms/truth-social.ts | Implements Truth Social URL matching, authenticated status fetching, HTML-to-text conversion, and normalized post transformation. |
| packages/platforms/src/platforms/truth-social.d.ts | Declares the expected Truth Social account, media, status, quote, and reply response structures. |
| apps/api/src/index.ts | Forwards the Truth Social access-token binding to platform fetchers. |
| apps/bot/src/lib/builder.ts | Improves the human-readable platform label but references a Truth Social emoji that is not available to the synchronization system. |
| packages/platforms/src/platforms/index.ts | Registers Truth Social through the namespace-derived platform registry. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
URL[Truth Social URL] --> Match[TruthSocial.match]
Match --> API[API scrape route]
API -->|Bearer token| Status[Truth Social status API]
Status --> Fetch[TruthSocial.fetch]
Fetch --> Transform[TruthSocial.transform]
Transform --> Post[NormalizedPost]
Post --> Builder[Discord embed builder]
Builder --> Footer[Truth Social footer]
EmojiAssets[Synced emoji assets] -. missing TruthSocial asset .-> Footer
Prompt To Fix All With AI
### Issue 1
apps/bot/src/lib/builder.ts:175
**Missing Truth Social Emoji**
Truth Social posts now reach this footer, but `getEmojiByName(post.platform)` looks up a `TruthSocial` application emoji while no `TruthSocial.png` asset is synchronized. This supplies an undefined ID to `formatEmoji`, leaving every Truth Social embed with an invalid or visibly broken platform emoji reference. Add the corresponding emoji asset or provide a deliberate fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(bot): label Truth Social footer" | Re-trigger Greptile
| (footer) => | ||
| footer.setContent( | ||
| `${getEmojiByName(post.platform)} • ${time(post.timestamp, TimestampStyles.LongDateShortTime)} • ${hyperlink(`View on ${post.platform}`, post.url)}`, | ||
| `${getEmojiByName(post.platform)} • ${time(post.timestamp, TimestampStyles.LongDateShortTime)} • ${hyperlink(`View on ${platformName}`, post.url)}`, |
There was a problem hiding this comment.
Truth Social posts now reach this footer, but getEmojiByName(post.platform) looks up a TruthSocial application emoji while no TruthSocial.png asset is synchronized. This supplies an undefined ID to formatEmoji, leaving every Truth Social embed with an invalid or visibly broken platform emoji reference. Add the corresponding emoji asset or provide a deliberate fallback.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/bot/src/lib/builder.ts
Line: 175
Comment:
**Missing Truth Social Emoji**
Truth Social posts now reach this footer, but `getEmojiByName(post.platform)` looks up a `TruthSocial` application emoji while no `TruthSocial.png` asset is synchronized. This supplies an undefined ID to `formatEmoji`, leaving every Truth Social embed with an invalid or visibly broken platform emoji reference. Add the corresponding emoji asset or provide a deliberate fallback.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
brings Truth Social embeds back using the status API.
supports both Truth Social post URL formats, including image and video attachments. the API worker reads
TRUTH_SOCIAL_ACCESS_TOKENand sends it as a bearer token.