Skip to content

Subscribing to a specific notifiable instance #202

@adamsosterics

Description

@adamsosterics

Problem or use case

I would like to let my users subscribe notifications from a specific notifiable instance, e.g. if my application has Posts with many Comments, I can subscribe to Post #1 and Post #4 and get the comment.created notification for only those posts, but not the others.
Similar to how notifications work here in Github, it's possible to subscribe to notifications about a specific issue.

Expected solution

When creating a subscription, I want to specify a notification instance next to the key, so when that notification instance sends out a notification, I want to get notified, regardless of what is set up in targets of the acts_as_notifiable

I'm also open to suggestions, I'm curious to hear how you would solve this.

Alternatives

I can use the existing targets on acts_as_notifiable but there's not always a clear link between the notifiable and the targets.
I also considered abusing the notification keys for it (something like post.1.comment_created), but the key is used to look up the views for the notifications, so that's not viable. Maybe if we could specify the view to use for each notification key...?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions