Skip to content

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

Description

@Sebastian-Webster

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions