Skip to content

feat: restore Truth Social support - #100

Merged
rosethornbush merged 2 commits into
mainfrom
feat/platforms/truth-social
Sep 9, 2026
Merged

feat: restore Truth Social support#100
rosethornbush merged 2 commits into
mainfrom
feat/platforms/truth-social

Conversation

@rosethornbush

Copy link
Copy Markdown
Contributor

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_TOKEN and sends it as a bearer token.

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5d07e6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown

Greptile Summary

This 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.

  • Supports both /@user/<id> and /@user/posts/<id> URL forms.
  • Converts API status data, media, metrics, and nested context into normalized posts.
  • Adds the required worker binding and platform registration.
  • The bot footer still lacks a synchronized Truth Social platform emoji.

Confidence Score: 4/5

The 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

Important Files Changed

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
Loading

Fix all with Greploop Fix All in Codex

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)}`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Fix in Codex

@rosethornbush
rosethornbush merged commit 77d9cce into main Sep 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant