Continuing the discussion from Discourse Automation:
The triggers for adding or removing someone from a group include a handy placeholder for group_name
. Unfortunately, it’s set to the stub (e.g., support-enthusiasts
) and not the full name (“Discourse Support Enthusiasts”). The code is:
"placeholders" => {
"group_name" => group.name,
},
Since the group name stub is all you need to create a group, I can see why the code is like that. But when it comes to, say, sending a welcome PM when someone joins the group, it’d be a lot nicer to use the full name, if possible:
"placeholders" => {
"group_name" => group.full_name || group.name,
},
Is there a use case that needs the stub? If so, maybe add a new group_full_name
placeholder instead?
"placeholders" => {
"group_name" => group.name,
"group_full_name" => group.full_name || group.name,
},