The DEV Team

New Feature: Organization Notifications!

・1 min read

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

Zhao-Andy avatar
Zhao-Andy commented on Feb 07, 2019

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!

DISCUSSION (3)
The team behind this very platform. πŸ˜„
 

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

 
 

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

Classic DEV Post from Jan 30

Make art, not apps <3

You don't have to build an app. In fact, if you don't need to, then don't.

The hardworking team behind dev.to ❀️

Want to contribute to open source and help make the DEV community stronger?

All the dev.to code is freely available on GitHub.

You're welcome to jump in!

Still don't have a dev.to account? You're welcome to lurk, but it's better to be part of the community.

Sign up now ❀️