Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled posts #740

Open
TonyGiorgio opened this issue Jan 10, 2024 · 5 comments
Open

Scheduled posts #740

TonyGiorgio opened this issue Jan 10, 2024 · 5 comments
Labels
bot difficulty:medium-hard feature new product features that weren't there before territories

Comments

@TonyGiorgio
Copy link

Is your feature request related to a problem? Please describe.
I often have my best ideas around midnight, however posting during off-hours will lead to very little engagement. I often sleep in or have other normal life priorities during the more engaging morning hours.

Describe the solution you'd like
I would like to draft a post that is scheduled to go out at a specific time in the future. I really like shipyard.pub for scheduling posts on nostr.

Screenshot 2024-01-09 at 9 26 58 PM

Describe alternatives you've considered
I could write a bot that does this but would rather not. I could wake up earlier and drink more coffee while using stacker.news but would rather not.

Additional context
Specifically I'm thinking about this for territories since I want to write more engaging posts but it's hard to be on top of it throughout the day each day. I could schedule a bunch of things at once to have content for every day.

@TonyGiorgio TonyGiorgio added the feature new product features that weren't there before label Jan 10, 2024
@alexlwn123 alexlwn123 self-assigned this Feb 14, 2024
@alexlwn123
Copy link
Contributor

alexlwn123 commented Feb 14, 2024

Strategy/Plan

  • mirror @delete job flow (@schedule)
    • @schedule in X [seconds|minutes|etc.]
    • @schedule for [timestamp]
    • should work for all kinds of messages (comment, poll, post, etc.)
  • Data Model
    • Add postScheduledAt field to Item model
    • Add isScheduled field too
    • link
  • On message creation (upsert), enque a ScheduledPostJob
    • replace @schedule in X... with @schedule for [timestamp]
    • Only notify the poster (not subscribers)
    • link
  • scheduled posts should be filtered from queries
    • filter item queries for !isScheduled
    • except for on a stacker's own profile page
      • Filter by "scheduled"
  • If a scheduled post is deleted
    • delete the item
    • clear the scheduled post job
      * refund stacker?
  • If a scheduled post is edited
    • clear the schedule post job
    • recreate the schedule job when the stacker hits save
      • Allows stacker to update when the post is scheduled
  • When it's time to post the item
    * remove @schedule for ... line
    • updateItem to item.isScheduled = false
    • notify founder,subscribers,poster

@huumn
Copy link
Member

huumn commented Feb 14, 2024

Excellent breakdown!

IMO:

  • No refund
  • Keep @schedule in the post ... I like the transparency of it.

@huumn huumn added the bot label Feb 14, 2024
@ekzyis
Copy link
Member

ekzyis commented Feb 14, 2024

Damn, using @schedule like @delete is a very nice idea. I was worried about having some complicated UI with calendar inputs + time somehow. And relative inputs would still be missing then.

Now this can reuse a lot of stuff from @delete!

@huumn
Copy link
Member

huumn commented Feb 14, 2024

Agreed. super duper clever to just do another native bot

@ekzyis
Copy link
Member

ekzyis commented Jul 1, 2024

I think however this is implemented, it should also support drafts. A draft is basically a scheduled post with no time yet / scheduled into infinity.

UX might be different though. For example, not sure if @draft as an alias for @schedule with no options is good UX.

On another note, posting something is the same as scheduling it for right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot difficulty:medium-hard feature new product features that weren't there before territories
Projects
None yet
Development

No branches or pull requests

4 participants