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

feat: Add events for Notification read / read all #3203

Merged
merged 5 commits into from
Dec 14, 2021

Conversation

imorland
Copy link
Member

Changes proposed in this pull request:
Adds events for Notification read and readall actions, for extensions to listen for.

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@davwheat
Copy link
Member

davwheat commented Dec 14, 2021

Would it be worth also passing the time to the events? There's a chance that any event handlers may wish to use it (for whatever reason), and the time at that moment might not be the same as what was set on the DB table.

@imorland
Copy link
Member Author

imorland commented Dec 14, 2021

Yeah, I guess that could be useful. Didn't think of that as part of the use case I hace in mind, but useful nonetheless.

Co-authored-by: David Wheatley <hi@davwheat.dev>
@askvortsov1 askvortsov1 added this to the 1.2 milestone Dec 14, 2021
@askvortsov1 askvortsov1 merged commit 6136ce8 into master Dec 14, 2021
@askvortsov1 askvortsov1 deleted the im/notification-events branch December 14, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants