DEV Community

Andy Zhao (he/him) for The DEV Team

Posted on

New Feature: Organization Notifications!

Organizations can now receive notifications!

If you are a member of an organization, you will be notified of any new comments or reactions to your organization's posts, as well as any new followers to your organization. You can find them in your notifications page.

Nitty gritty details and the technical implementation can be found in the pull request:

Organization Notifications #1762

What type of PR is this? (check all applicable)

  • [x] Feature

Description

This adds notifications for organizations! πŸŽ‰

Implementation details:

  • Anyone who is a member of the organization can view the org's notifications.
  • Any org member who views the org notifications will mark them as read.
  • The routes are: /notifications/org/:org_id and /notifications/comments/:org_id. This keeps it flexible for people who belong to multiple orgs.
  • There is no filter for posts because orgs can't follow people (and therefore cannot receive notifications for new posts).
  • Orgs can receive new comment and reaction notifications on their org posts, as well as notifications for new followers.
  • Org notifications are not counted in the bell icon.
  • Notifications can belong to either a user or an organization. One or the other, not both. I could add a database constraint but that would require some custom SQL. Not sure if it's completely necessary.

One feature I forgot -- I remembered just now while writing is -- is the ability for orgs to send a new post notification to their followers. I can add this in if we want. Don't think it would take too much time. Just added this πŸ‘

Related Tickets & Documents

Resolves #1222

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Mobile View

Mobile View

Desktop View

Desktop View

[optional] What gif best describes this PR or how it makes you feel?

Tada!

Happy coding!

Top comments (4)

Collapse
 
ben profile image
Ben Halpern

So if I comment here, the org gets a notification?

Collapse
 
ben profile image
Ben Halpern

Story checks out.

Collapse
 
_bigblind profile image
Frederik πŸ‘¨β€πŸ’»βž‘οΈπŸŒ Creemers

Might be worth thinking about blocking org notifications from your own actions, or actions from members of the org.

Collapse
 
xanderyzwich profile image
Corey McCarty

Is there any other information about running an organization? I've looked around and up til now found nothing aside from this.