feat: Add Truth Social auto-poster backend with proxy endpoint #2011
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added Truth Social auto-poster backend with proxy endpoint to avoid CORS issues.
Changes
truthSocialPostController.js- Proxy endpoint to post to Truth Social, verify token, history and schedulingtruthSocialRouter.js- Routes for all Truth Social endpointstruthSocialScheduledPost.js- MongoDB model for scheduled poststruthSocialPostHistory.js- MongoDB model for post historyEndpoints
POST /api/truthsocial/post- Proxy post to Truth Social (avoids CORS)POST /api/truthsocial/verify- Verify tokenPOST /api/truthsocial/history- Save to historyGET /api/truthsocial/history- Get post historyPOST /api/truthsocial/schedule- Schedule a postGET /api/truthsocial/schedule- Get scheduled postsDELETE /api/truthsocial/schedule/:id- Delete scheduled postPUT /api/truthsocial/schedule/:id- Update scheduled postNote
Auto-posting is not supported due to Truth Social's Cloudflare protection. Scheduled posts must be manually posted via "Post Now" button.