Hi,

I have a node type that belongs to organic groups. I want to send notifications via message and email when a new node is created. The tokens that I add to the email will reference the node created and its OG. The tokens in the message render just fine. However, the tokens referencing the group in the emails are not rendered upon creation programmatically.

Another strange thing is if I view the message and send a notification through the message(not programmatically) the tokens in the email are rendered just fine.

Here is a sample token that doesn't get rendered: [message:field-node-ref:og-group-ref:title]

One thing that might be a contributer is that I envoke message_subscribe_send_message() from hook_node_insert().

Is there something I'm missing here?

Comments

psychobyte’s picture

Issue summary: View changes
psychobyte’s picture

Status: Active » Closed (fixed)

I was able to replace the tokens by sending a callback and callback argument to the message_create() function.