I would like to propose a new module which makes use of the clever subscriptions queue and provides an intelligent "send notification" link.
Often, after writing a post, I would like to make sure that certain people get notified about it. I can not know whether they have already received a notification because I can not know whether they are subscribed for it. Currently the only option I have is to email them about it. But that may annoy them because they may be notified twice, once by their subscription and once by me.
So, instead, I would like to have a "send notification" link on the node that does not actually send out the email but instead queues a notification in the subscriptions queue. The way I understand the subscriptions queue, it is automatically intelligent enough not to send the notification twice.
Clicking on the "email this" link should bring up a window with convenient controls for selecting the users that I want to notify. This should probably just be a textfield with autocomplete function where I type in the username together with an "Add" button which adds the username to a list. Then there should be a "notify" button which submits all the notifications to the queue.
Comments
Comment #1
salvisYes. What it does is when it processes a queue item, it removes all rows that have the same uid/load_function/load_args (subscriptions_mail_cron(), line 99). In addition, if the load_function is subscriptions_content_node_load() or subscriptions_content_comment_load(), _subscriptions_content_load() also loads all queued comment notifications for the node and purges them from the queue.
Since you don't know when (and how often) cron will run, the only way to really avoid sending duplicate notifications is to set your recipients before saving the node. This might be a case where AJAX would provide a real benefit.
Comment #2
salvis