Are notifications unique to a profile or an account?

alt=
DannyA
@dannya
10 years ago
584 posts
Are notifications unique to a profile or an account?
updated by @dannya: 12/20/14 03:18:48PM
brian
@brian
10 years ago
10,148 posts
DannyA:
Are notifications unique to a profile or an account?

They are unique to a User Account.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
So if you are logged in as a power user, do you get notifications for ALL linked profiles? or just the main power user profile?
brian
@brian
10 years ago
10,148 posts
DannyA:
So if you are logged in as a power user, do you get notifications for ALL linked profiles? or just the main power user profile?

For example - if someone posts a new comment on "profile a", and "user a" is a power user that controls "profile a", and they have enabled the notifications in their "notifications" tab of their user account, they will get a notification.

Let me know if that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
What if user a, a power user, creates profiles b,c, and d.


And in the notification settings, we have elected to be notified when we have a new follower.

Artist profile D gets a new follower. (note there is no other user to manage profile d). Does user a get a notification of user D's new follower?
brian
@brian
10 years ago
10,148 posts
DannyA:
What if user a, a power user, creates profiles b,c, and d.

And in the notification settings, we have elected to be notified when we have a new follower.

Artist profile D gets a new follower. (note there is no other user to manage profile d). Does user a get a notification of user D's new follower?

Yep.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
Sorry one more question. I user D later signs up, and we link profile D to it, do both users get the notifications?
brian
@brian
10 years ago
10,148 posts
DannyA:
Sorry one more question. I user D later signs up, and we link profile D to it, do both users get the notifications?

Yes - User A and D will both get notifications for updates on profile D, while only User A will get notifications for profiles B and C.

Let me know if that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
yep/ thanks/
alt=
DannyA
@dannya
10 years ago
584 posts
Although, if i had a wish list, this would also be linked to the profile. I can see the label only wanting alerts for their profile, and not the artists.
brian
@brian
10 years ago
10,148 posts
DannyA:
Although, if i had a wish list, this would also be linked to the profile. I can see the label only wanting alerts for their profile, and not the artists.

So how would that work if there are 4 User accounts tied to a profile, and User 1 wants notifications but not User 2? It's the same issue as with One All - it's why notifications are user centered, and not profile centered.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
The same way your profile settings work (e.g. payout address). You have multiple accounts but you have some settings that are specific to the profile (profile name, profile picture, payout address). All these fields are profile dependent even though multiple accounts can access it.

You can have multiple accounts, but you are changing the settings for the selected PROFILE. You would probably have to specify the notification email in the notification settings instead of using the email tied to the account. This would have the added bonus of being able to send notification to a group if you wanted to (or multiple recipients). It would be much more flexible.

As a bonus, the notifications could also be sent to a callback url that would allow other actions to be triggered once a notification is received.
brian
@brian
10 years ago
10,148 posts
DannyA:
The same way your profile settings work (e.g. payout address). You have multiple accounts but you have some settings that are specific to the profile (profile name, profile picture, payout address). All these fields are profile dependent even though multiple accounts can access it.

You can have multiple accounts, but you are changing the settings for the selected PROFILE. You would probably have to specify the notification email in the notification settings instead of using the email tied to the account. This would have the added bonus of being able to send notification to a group if you wanted to (or multiple recipients). It would be much more flexible.

As a bonus, the notifications could also be sent to a callback url that would allow other actions to be triggered once a notification is received.

Items are "sold" at the profile level (not user level) so it makes sense to have the payout email address on the profile. That doesn't make sense from a notification perspective though as that is not as flexible as the current setup, which allows each individual user to decide what and how they are notified.

If you need it to work at the profile level, that is something you would have to customize yourself.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
Yes, but those actions happen at the profile level as well, not at the user level. But the same can be said for the other notifications:
New pending follower
New Follower
Follower approved
New comment posted
Item liked
mentioned in actifity stream

All of these actions are performed on a profile. If you are a power user, and you have many accounts, you cannot decide which profiles you want notifications for; you have to get them for all, which, if you are a label with many artists, could be many.

On the other hand, if 2 accounts have access to a profile, it's much easier to agree which one gets sets the notification prefences. And again, if you were able to specify the notification address(s) and/or url, you would have granular control.

I can appreciate your intent, but I don't think you've really thought through a lot of the power user scenarios and the complexities it presents. As you said, I will have to customize this as well. Not sure how to do it though since many modules depend on it...
brian
@brian
10 years ago
10,148 posts
Actually I have thought through this extensively. I understand you want notifications to be at the profile level, but for 99% of users it just doesn't make sense. All of those actions you listed are actions performed ON a profile, but that doesn't mean that in a multi-user profile that all the users must be treated as ONE user (as you say "agree which one gets the notification") - that's just much less flexible then what we have.

I think we will need to agree to disagree here, but be sure that I've thought about this many, many times, and believe the current setup is the best. Your the first person in almost 2 years of Jamroom 5 now to even ask for it to be done at the profile level, so based on that I would assume it is working well for almost all of our users.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
Agree to disagree. However, curious as to how many users are using the power user functionality effectively.
alt=
DannyA
@dannya
10 years ago
584 posts
So Brian, is there an event we can call to modify the notification functionality to our needs without breaking notifications for other modules?
michael
@michael
10 years ago
7,717 posts
DannyA:...is there an event we can call to modify the notification functionality to our needs without breaking notifications for other modules?...

There is the 'notify_user' event inside the jrUser_notify function.

That's probably the one you want.
alt=
DannyA
@dannya
10 years ago
584 posts
So is there a way to have the notify_user event call a custom PROFILE_notify function? Basically i would like to have my own profile notify function so I can store all my notification preferences at the profile level. I'm happy to write our own module for this.

My question is how we make sure the existing modules use my custom notifications? How can we modify the esiting notify_user event without breaking our module every time we update jamroom or any modules with notifications?


updated by @dannya: 11/18/14 09:25:49PM
michael
@michael
10 years ago
7,717 posts
DannyA:...How can we modify the esiting notify_user event without breaking our module every time we update jamroom or any modules with notifications?...

That's what events and listeners are for.

"Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/development/1011/events-and-listeners


your module will 'listen' for when the 'notify_user' event happens and at that point your module fires the function you have set to listen for that event.

When notify_user functions you will get this data:
    // notify user trigger
    $_data = array(
        'to_user_id'   => $to_user_id,
        'from_user_id' => $from_user_id,
        'module'       => $module,
        'event'        => $event,
        'subject'      => $subject,
        'message'      => $message,
        'registered'   => $_tmp
    );
    jrCore_trigger_event('jrUser', 'notify_user', $_data);

which will come in on $_data inside your function.

You check what is in $_data and if it matches the set of conditions your after, then you do what you need to do.

It sounds like what you need to do is: search on the email address of the user who is being notified, figure out what profile he is attached to and send your own email to that profile's designated email address.

Tags