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

Add Notification collection and APIs to retrieve and delete Notifications #321

Open
Sebastian-Webster opened this issue Nov 23, 2023 · 0 comments · May be fixed by #322
Open

Add Notification collection and APIs to retrieve and delete Notifications #321

Sebastian-Webster opened this issue Nov 23, 2023 · 0 comments · May be fixed by #322
Assignees
Labels
enhancement New feature or request

Comments

@Sebastian-Webster
Copy link
Member

Sebastian-Webster commented Nov 23, 2023

The Notification collection would have a TTL index so notifications would only be stored for 7 days after they are created.

Notification documents would be created for all notifications EXCEPT chat related notifications.

The notifications I can currently think of are:

  • Upvoted post or comment
  • Someone followed / requested to follow you
  • Someone commented on a post of yours

A notification document could have one of these two:

  1. profilePublicId - For notifications to do with someone following or requesting to follow you (allows the frontend to navigate to that user's profile)
  2. postId & postFormat - For notifications related to comments, comment upvotes, and post upvotes

Schemas to be created:

  1. Notification

Notification Schema Fields:
userId - ObjectId
profilePublicId - String
postId - ObjectId
postFormat - String
dateCreated - Date
text - String

New APIs to be created:

  1. GET temp/notifications
  2. POST temp/deletenotification (takes notificationId in body)
  3. POST temp/clearnotifications

APIs to be modified:

  1. temp/deleteimage
  2. temp/deletepoll
  3. temp/deletethread
  4. temp/deleteaccount
  5. temp/toggleFollowOfAUser
  6. temp/deletecomment
  7. temp/voteoncomment
  8. temp/voteonpost
  9. temp/removevoteoncomment
  10. temp/removevoteonpost
  11. temp/blockaccount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant