Forum Discussion

ttadej's avatar
ttadej
Advisor
8 years ago

Context object for name of 'mover' in immediate_general email template

In the 'immediate_general' email template, I'm looking for the context object for the user who moves a post. So if $notification.moved then I need to get the username of the user who moved the message.

 

I've tried the following without luck:

$actorLogin
$notification.message.actor.login
$notification.actor.login
$notification.message.lastEditUser.login

The reason_box template simply uses $actorLogin.

 

This current documentation for the Velocity email templates does not cover this topic (among many others): https://community.lithium.com/t5/Developer-Knowledge-Base/Email-template-context-objects/ta-p/75924

 

4 Replies

  • ttadej-

     

    Could you please try below context object.

     

    ${notification.message.author.login}

     

     On a default immediate_general email template this context object is being used. 

     

    #set ( $eventUser = "${notification.message.author.login}")
    #set ( $eventUserRanking = "${notification.message.author.ranking.name}")
    #if ($notification.moved)
    	#if ($notification.merged)
    		#set ($eventText = "merged a")
    	#else
    		#set ($eventText = "moved a")
    	#end
    #else	
  • ttadej's avatar
    ttadej
    Advisor
    8 years ago
    Thanks but that doesn't give me the name of the person who moved the post, it gives me the name of the author of the post.
  • ttadej- As you have tried all the possible context object which shown below and no other context object is mentioned on the documentation.

    $actorLogin
    $notification.message.actor.login
    $notification.actor.login
    $notification.message.lastEditUser.login

    Open a ticket to lithium support for this. Or if it is not available post an idea here

  • ttadej's avatar
    ttadej
    Advisor
    8 years ago

    For others running into the same issue, here is the response from Lithium:

    "Our product team agrees that this is a bug and I've opened an investigation to determine a possible fix. I'll keep you updated on our progress."