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
Comments
Comment #1
david lesieur commentedI agree, we need this!
Comment #2
patchak commentedGlad you agree, unfortunately I have no idea how to implement this, does not sound too complicated tho, does it?
Patchak
Comment #3
david lesieur commentedEh eh, right, should be pretty easy. :-) I should be able to look into this in a few days.
Comment #4
david lesieur commentedWell, 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.
Comment #5
patchak commentedHUmmm 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
Comment #6
david lesieur commentedIn 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. :-)