Reddit: posted by hand, with the rules pasted
Reddit's API isn't open to apps like this one, so Supermarket no longer signs in to Reddit, publishes or schedules there, or reads subreddits and the account's posts. The internal/api/reddit client, Reddit's OAuth, its keys and its Social accounts card are gone. Supermarket still writes the post. Each Reddit draft in Posts has a box for its subreddit's rules, with a link to them on Reddit: pasted once, they're kept (subreddits.data, as pasted_rules) and given to the model for later drafts. Open in Reddit saves the edits and opens the submit page filled in; Copy title and Copy text (with the tagged source link) cover a box that comes up empty; Mark as posted records it. Warnings come from the pasted rules and the posts marked as posted. Fill's subreddit suggestions are kept unchecked, and say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-11
@@ -25,7 +25,6 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"supermarket/internal/api/reddit"
|
||||
"supermarket/internal/api/twitter"
|
||||
"supermarket/internal/appmail"
|
||||
"supermarket/internal/billing"
|
||||
@@ -111,12 +110,6 @@ type state struct {
|
||||
// teamCache is what's kept in memory for a team.
|
||||
type teamCache struct {
|
||||
mu sync.Mutex
|
||||
// Reddit: an app-only token for reading rules before sign-in, and the
|
||||
// account's recent posts for the warnings.
|
||||
redditAppToken string
|
||||
redditAppTokenExp time.Time
|
||||
redditHist []reddit.Submission
|
||||
redditHistAt time.Time
|
||||
// Google's access token, which lasts an hour.
|
||||
googleToken string
|
||||
googleExpires time.Time
|
||||
@@ -448,7 +441,7 @@ func (s *Server) Handler() (http.Handler, error) {
|
||||
redirect(w, r, "/posts", r.URL.Query().Get("msg"))
|
||||
})
|
||||
mux.HandleFunc("POST /drafts/{id}/{action}", (*Server).draftAction)
|
||||
mux.HandleFunc("POST /reddit/rules/{name}", (*Server).refreshRules)
|
||||
mux.HandleFunc("POST /reddit/rules/{name}", (*Server).saveRules)
|
||||
|
||||
mux.HandleFunc("GET /prospects", (*Server).prospectsPage)
|
||||
mux.HandleFunc("GET /prospects/new", (*Server).prospectForm)
|
||||
@@ -870,7 +863,7 @@ type module struct {
|
||||
}
|
||||
|
||||
var modules = []module{
|
||||
{"content", "Content", "Phase 1", "Draft posts from partner and competitor news and your own products; review and publish to X, LinkedIn and Reddit.", "/posts"},
|
||||
{"content", "Content", "Phase 1", "Draft posts from partner and competitor news and your own products; review and publish to X and LinkedIn; Reddit posts are written for you to post yourself.", "/posts"},
|
||||
{"prospects", "Prospects", "Phase 2", "Test buying signals through the whole funnel, from finding prospects to payment; add the people you approve to EspoCRM through Hermes.", "/signals"},
|
||||
{"seo", "SEO", "Phase 3", "Run the weekly SEO loop from Search Console: what ranks, what moved, and the changes waiting for your yes, opened as pull requests on your Hugo repositories.", "/seo/check"},
|
||||
{"sites", "Sites", "Phase 5", "Build pages from your website's own sections, preview them, and publish them as pull requests on Gitea.", "/sites"},
|
||||
@@ -1026,7 +1019,6 @@ var flashes = map[string]string{
|
||||
"audited": "The audit is done.",
|
||||
"auditing": "Auditing. It reads up to 300 pages politely, so it takes a few minutes; this page updates when it's done.",
|
||||
"no-data": "There isn't two weeks of Search Console data yet.",
|
||||
"reddit-connected": "Reddit is connected.",
|
||||
"crm-test": "Test Lead queued. Hermes creates it on its next run; or run it now (below).",
|
||||
"crm-sync": "Sync requested: Hermes copies CRM records on its next run.",
|
||||
"accepted": "Accepted: queued for the CRM. Hermes adds it on its next run.",
|
||||
@@ -1040,7 +1032,7 @@ var flashes = map[string]string{
|
||||
"prospect-exists": "Already there: nothing new was added. It's in the list below.",
|
||||
"outcome": "Outcome recorded.",
|
||||
"discovering": "Searching. It takes a few minutes; new companies appear in Review, tagged with this signal.",
|
||||
"rules-refreshed": "Rules refreshed.",
|
||||
"rules-saved": "Rules saved: new drafts for that subreddit follow them.",
|
||||
"imported": "Imported.",
|
||||
"imported-counts": "Imported: %d new steps in the funnel, %d new people to review, %d new on the suppression list.",
|
||||
"hunter-done": "Hunter.io search done: the result is on the card.",
|
||||
|
||||
Reference in New Issue
Block a user