Email Notifications #3

Open
opened 2022-09-10 21:52:12 +00:00 by noah · 0 comments
Owner

To draw people back to the site to check on any notifications they've missed, the site should send periodic "daily digest" type emails notifying members of any new activity they've missed.

It will read like "You have 5 new notifications on nonshy" and break it down like "2 friend requests, 1 new message and 2 other notifications" and users can opt-out of these emails in their settings or clicking an unsubscribe link in the email footer.

The cadence and behavior should be:

  • 4 times a day the site will check if any emails need to be sent out (looking for users who have unanswered messages, friend requests or unread notifications), at 6 AM, noon, 6 PM and midnight (UTC time).
    • If your # of unread notifications has not changed since you last got an email, you do not get another email.
  • You will get at most 1 email per day if you don't log into the site; even if your # of notifications increased during the day, you don't get another email until 24 hours since the last one. Logging in to the site will reset that - so if you had e.g. 4 notifications, got an email, logged in, and didn't mark them as read: if you get a 5th+ notification later you may be emailed again about that in the same day.

User stories and examples:

  • You get an email about 3 unread notifications at 6 AM, and you don't log into the site all day. By the end of the day you got 4 additional notifications (7 unread now). You don't get an email about 7 unread notifications until 6 AM the next day (24 hours apart) since you had not logged in at all in between.
  • You get an email about 3 unread notifications at 6 AM, and don't log in all day, and remain at 3 unread notifications. You do not receive any further emails at all about those 3 notifications. If you get additional notifications later, you may be notified about those.
  • You get an email about 3 unread notifications at 6 AM, and you log in to check.
    • If you don't mark any of them read: you won't get any further email about your notifications until new ones come in. Because you logged in, you may get an email about the new notifications the next time emails are sent out.
    • If you mark all of them read: if you get new notifications later in the day you'll get the email about those as normal.

Some ideas for the SQL model to track email notification deliveries:

type EmailNotification struct {
    UserID            uint64
    EmailType         string // supports future growth
    NotificationCount int64  // # notifications last email
    LastSentAt        time.Time
    OptOut            bool   // user has opted out/unsubscribed
}
To draw people back to the site to check on any notifications they've missed, the site should send _periodic_ "daily digest" type emails notifying members of any new activity they've missed. It will read like "You have 5 new notifications on nonshy" and break it down like "2 friend requests, 1 new message and 2 other notifications" and users can opt-out of these emails in their settings or clicking an unsubscribe link in the email footer. The cadence and behavior should be: * 4 times a day the site will check if any emails need to be sent out (looking for users who have unanswered messages, friend requests or unread notifications), at 6 AM, noon, 6 PM and midnight (UTC time). * If your # of unread notifications has not changed since you last got an email, you do not get another email. * You will get at most 1 email per day if you don't log into the site; even if your # of notifications increased during the day, you don't get another email until 24 hours since the last one. Logging in to the site will reset that - so if you had e.g. 4 notifications, got an email, logged in, and didn't mark them as read: if you get a 5th+ notification later you may be emailed again about that in the same day. User stories and examples: * You get an email about 3 unread notifications at 6 AM, and you don't log into the site all day. By the end of the day you got 4 additional notifications (7 unread now). You don't get an email about 7 unread notifications until 6 AM the next day (24 hours apart) since you had not logged in at all in between. * You get an email about 3 unread notifications at 6 AM, and don't log in all day, and remain at 3 unread notifications. You do not receive any further emails at all about those 3 notifications. If you get additional notifications later, you may be notified about those. * You get an email about 3 unread notifications at 6 AM, and you log in to check. * If you don't mark any of them read: you won't get any further email about your notifications until new ones come in. Because you logged in, you may get an email about the new notifications the next time emails are sent out. * If you mark all of them read: if you get new notifications later in the day you'll get the email about those as normal. Some ideas for the SQL model to track email notification deliveries: ```go type EmailNotification struct { UserID uint64 EmailType string // supports future growth NotificationCount int64 // # notifications last email LastSentAt time.Time OptOut bool // user has opted out/unsubscribed } ```
noah added the
enhancement
label 2022-09-10 21:52:12 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: nonshy/website#3
No description provided.