bradwj / friend-advisor

FriendAdvisor is a mobile app with a focus on allowing friends and family to coordinate and receive text notifications about upcoming group events.
https://friendadvisor.tech
MIT License
4 stars 0 forks source link

Add ability to schedule notifications about upcoming events #22

Open bradwj opened 2 years ago

bradwj commented 2 years ago

Text notifications are by default sent out a month before, week before, day before, and on the day of the event. We should allow users to choose which days or on how many days before that notifications should be sent. I'm thinking that we'll restructure the documents for events too have their sentNotifications look something like this:

sentNotifications: [
  { 
    hoursBefore: 24, // day of
    usersNotified: [<array of user IDs>]
  },
  {
    hoursBefore: 48, // day before
    usersNotified: [<array of user IDs>]
  },
  {
    hoursBefore: 168, // week before
    usersNotified: [<array of user IDs>]
  },
  {
    hoursBefore: 720, // month before
    usersNotified: [<array of user IDs>]
  },
]

This could be how the default notification schedule will look, but the user should have the option to define their own.