Send email to group when a node changes audience?
patchak - May 30, 2007 - 18:58
| Project: | OG Audience |
| Version: | 5.x-1.0 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
I jut realised that the OG audience module does not send an email to a group when a node is 'added' to that group.
When a node is created in a group, the mail is sent perfectly... but not when a node "arrives" in a group, which is, in the end, kinda the same thing...
So what it think would be nice, is to have the module send the same email sa the regular OG email for new content...
Good idea?
Thanks,
Patchak

#1
I agree, we need this!
#2
Glad you agree, unfortunately I have no idea how to implement this, does not sound too complicated tho, does it?
Patchak
#3
Eh eh, right, should be pretty easy. :-) I should be able to look into this in a few days.
#4
Well, I just had a look at the code and it's still easy, but not as trivial as I expected. The right thing to do is to call the og_mail() function to notify subscribers, but that will notify the subscribers of all groups the node belongs to. If, for example, a node was created in group A and later added to group B with OG Audience, then subscribers of both groups would receive an e-mail if OG Audience called og_mail().
I think the right thing to do would be to improve og_mail() to accept an optional list of groups to be notified.
#5
HUmmm yeah cause sending to multiple groups does not really make sense... Thanks for looking into this! Keep me posted when you have some more news!
Patchak
#6
In fact, we do want to be able to notify multiple groups, because OG Audience can be used to add a node to many groups at once. But we certainly don't want to notify the groups the node was already belonging to.
However, I also noticed that OG only send e-mail notifications upon node creation (or comment creation). This means that adding groups from the node editing form won't send any e-mail to the node's new groups... I don't think this is the ideal behavior, but at least OG Audience is consistent with OG at the moment. :-)