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: Flag notifications #19

Merged
merged 4 commits into from
Mar 25, 2022
Merged

feat: Flag notifications #19

merged 4 commits into from
Mar 25, 2022

Conversation

imorland
Copy link
Member

Allow subscriptions to new flags.

Whilst the alert notification is probably redundant, the email option could be useful for moderators who are not always online.

@imorland imorland linked an issue Mar 25, 2022 that may be closed by this pull request
@imorland imorland merged commit b2d61ac into master Mar 25, 2022
@imorland imorland deleted the im/flag-notifications branch March 25, 2022 11:34
$flag = $this->flag;

$notify = User::query()
->where('users.id', '!=', $flag->actor->id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be $flag->user ? rather than $flag->actor ?

The user() is the relationship, actor only happens to be there upon an authenticated request from the http kernel.

If this gets executed by a queue worker, the actor isn't populated, however user is as this is a defined relationship.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great spot! How did this ever work 🙈

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait this is new code, okay makes sense. Let's get it fixed @imorland can probably tag a release somewhere the coming days.

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.

Notification web / email for flagged post
3 participants