-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added signal for notifications #234
Conversation
Is this ready for our review? can you please fill in the PR cover letter? Thanks! |
Some tests are failing so I converted it to a draft. Meanwhile, I will also add a description for this PR. |
d18597b
to
a6f4904
Compare
@mariajgrimaldi The PR is ready for review |
openedx_events/learning/signals.py
Outdated
# Warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet | ||
# | ||
USER_NOTIFICATION = OpenEdxPublicSignal( | ||
event_type="org.openedx.notifications.user_notification.v1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is in the learning domain (which I think it is) it should start with org.openedx.learning
I also think a name like org.openedx.learning.user.notification.sent
would be a bit more in keeping with how we've named other things. We could call the event USER_NOTIFICATION_SENT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This signal is supposed to be used for sending notifications, it is not triggered after notification is sent. I am updating name like this org.openedx.learning.user.notification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should clarify a little more about what this event means. Our other event names are all of the form "something happened," so I think we should be consistent. Robert suggested "USER_NOTIFICATION_REQUESTED" which I think makes sense. That would make the event type org.openedx.learning.user.notification.requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated .
CHANGELOG.rst
Outdated
@@ -14,6 +14,12 @@ Change Log | |||
Unreleased | |||
---------- | |||
|
|||
[8.1.1] - 2023-06-08 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call this 8.2.0. usually x.x.1 means a bug patch rather than a new feature or model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, but otherwise LGTM
feat: added new version and changelog fix: added notification signal to KNOWN_UNSERIALIZABLE_SIGNALS feat: added course_id in notification data fix: updated version and event name fix: added updated event name in KNOWN_UNSERIALIZABLE_SIGNALS refactor: updated notification name refactor: changed name notificaiotns to notification
8eca70b
to
520f222
Compare
Description:
Thir PR adds new signal
USER_NOTIFICATION_REQUESTED
It will be used to create notifications for users.ISSUE: Link to GitHub issue
https://2u-internal.atlassian.net/browse/INF-876
Reviewers:
Merge checklist:
Post merge:
finished.