1
I wrote a module that users post messages to a weblog. When a comment is left on that post, I want to send the owner a notification.
I thought of just subscribing them to posts automatically as they post them, but their Notifications list will become very large quickly, and largely unmaintainable. Therefore, I thought I would just send a notification based on a setting in the weblog setup, "Receive new comment notifications?".
I knew of the notifications handler I thought I would just trigger it with the specified user_id in the user_list array, however, when looking into it deeper it states in the dev wiki: "$user_list - if left blank, any user who subscribed to the event will receive notification. If you specify an array of users (an array of user id's), only those users will be notified (only if they are subscribed)."
So. I thought of one solution, but it's goofy and not very good programming, but on a comment post, I could subscribe them, send a notification, then unsubscribe them. This seems silly.
Is there a better way to handle this situation?
Thanks,
CoolPops