feat: Create EmptyWikibaseNotification Model and Notification#656
Conversation
m90
left a comment
There was a problem hiding this comment.
Looks great now, I left one last round of comments, nothing major.
| $wikiManagers = $wiki->wikiManagers()->get(); | ||
|
|
||
| foreach($wikiManagers as $wikiManager) { | ||
| $wiki->wikiNotificationSentRecords()->create([ |
There was a problem hiding this comment.
Like this, we'd also create a record when the notfiy call below fails immediately. Should we create the record after calling notify?
There was a problem hiding this comment.
That's a great point but I'm not sure if that is the case since the notify method appears to dispatch the sending, but I'm not entirely sure how it all works in detail. My thinking was the other way around: prevent a case where we send a notification but don't keep a record, resulting in potentially spamming a user. But now I'm not sure how to prevent both cases
There was a problem hiding this comment.
Hmm, if notify will only ever fail asynchronously, then your argument is valid and it should be kept in the order you put it here. Maybe it's worth a comment though?
m90
left a comment
There was a problem hiding this comment.
LGTM 🦖
Do you still want to add the CHANGELOG entry to this PR so we can ship it when merged?
…nt as notifcation type string
68f6c9b to
44fb3e4
Compare
https://phabricator.wikimedia.org/T344689