I am using Rules, Message, Message Notify and Flag modules. I added a message to the activity stream when user flags a node as "Favorite".
My problem is I am getting notification, but the node that was flagged seems to be missing from the message entity. Please guide for the steps, or where I may be wrong
UPDATE: Adding rules in export format for better understanding and reference. In mail being send through rule, every token is working perfectly, but not in message added to activity stream.
{ "rules_user_likes_a_node" : {
"LABEL" : "User likes a node",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "flag" ],
"ON" : { "flag_flagged_group_flag" : [] },
"DO" : [
{ "variable_add" : {
"USING" : { "type" : "node", "value" : [ "flagged-node" ] },
"PROVIDE" : { "variable_added" : { "node" : "Added variable" } }
}
},
{ "mail" : {
"to" : [ "flagged-node:author:mail" ],
"subject" : "[flagged-node:content-type] [flagged-node:title] est aim\u00e9",
"message" : "Hello [flagged-node:author:name],\r\n\r\n\r\n[flagging-user:name] loved[flagged-node:content-type] [flagged-node:title]",
"language" : [ "" ]
}
},
{ "entity_create" : {
"USING" : {
"type" : "message",
"param_type" : "commons_activity_streams_user_likes_a_node",
"param_user" : [ "site:current-user" ]
},
"PROVIDE" : { "entity_created" : { "message" : "Created entity" } }
}
},
{ "data_set" : { "data" : [ "flagged-node" ], "value" : [ "flagged-node" ] } }
]
}
}