Skip to content

Sheetal - reddit auto poster backend#1928

Open
sheetalmangate wants to merge 5 commits intodevelopmentfrom
sheetal-reddit-auto-poster-backend
Open

Sheetal - reddit auto poster backend#1928
sheetalmangate wants to merge 5 commits intodevelopmentfrom
sheetal-reddit-auto-poster-backend

Conversation

@sheetalmangate
Copy link
Copy Markdown

@sheetalmangate sheetalmangate commented Nov 30, 2025

Description

Implements the frontend interface for the Reddit Auto Poster feature. This update adds a basic UI for creating Reddit text and link posts, scheduling posts for future publication, and managing scheduled jobs (view and cancel). The component is currently placed under the Announcements section for testing purposes. This feature is not yet styled for production and is intended for internal review and testing only.

Related PRS (if any):

This frontend PR is related to the #4478 frontend PR.
To test this backend PR you need to checkout the #4478 frontend PR.

Main changes explained:

-- Added Reddit tab under Announcement. To access Announcement go to option Other Links -> Send Emails.
-- Reddit Auto poster provides UI for 1) Submitting text or link post to Reddit 2) Schedule Reddit posts.
-- Schedule Reddit post provides the ability to create and/or upload content used to schedule posts 6 months in advance.
-- Post History display the list of all scheduled posts those are submitted.
-- Create Reddit App : use below URL to create reddit app and use your CLIENT_ID and CLIENT_SECRET.
https://www.reddit.com/prefs/apps
-- While creating app in reddit use below link as redirect url
http://localhost:5173/announcements/platforms/reddit/redirect

How to test:

  1. check into current branch
  2. add below environment variables in .env file
  REACT_APP_REDDIT_CLIENT_ID=YOUR_REDDIT_CLIENT_ID
  REACT_APP_REDDIT_CLIENT_SECRET=YOUR_REDDIT_CLIENT_SECRET
  REACT_APP_REDDIT_REDIRECT_URL="http://localhost:5173/announcements/platforms/reddit/redirect"
  1. do yarn install and yarn start:local to run this PR locally
  2. Clear site data/cache
  3. log as admin user
  4. go to Dashboard→ Other Links → Send Emails → Reddit.
  5. To submit scheduled post use end point api/autoposter/reddit/posts/action/auto-submit from postman

Screenshots or videos of changes:

Autoposter_work_flow.mp4

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Feb 8, 2026

const post = await RedditPost.findById(id);
if (!post) {
return res.status(204).json({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

204 means "No Content" and browsers/clients will ignore the body entirely. Should be 404

}, index * 1000);
});

return res.status(200).json({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Results will always be [] when the response is sent. The forEach + setTimeout approach means the response is sent back immediately with empty results, before any posts are actually submitted. The async work inside setTimeout is never awaited. Use Promises here.

@SharadhaKasiviswanathan
Copy link
Copy Markdown
Contributor

I have tested this PR locally, also posted comments and screenshots on the frontend for PR #4478.
OneCommunityGlobal/HighestGoodNetworkApp#4478 (comment)

@one-community one-community added Do Not Review Do not review or look at code without full context Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. and removed High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible labels Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Review Do not review or look at code without full context Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants