diff --git a/Topcoder/class.topcoder.plugin.php b/Topcoder/class.topcoder.plugin.php index cb1640e..02a551f 100644 --- a/Topcoder/class.topcoder.plugin.php +++ b/Topcoder/class.topcoder.plugin.php @@ -2388,7 +2388,7 @@ public function profileController_preferences_create($sender, $userReference = ' $sender->render(); } - // All notified users have been added in an activity + // All notified users have been added in an activity. This called before adding an activity in an activity Queue and sending+saving it in DB public function activityModel_BeforeCheckPreference_handler($sender, $args) { $activity = &$args['Data']; $notifyUserID = val('NotifyUserID', $activity); @@ -2405,11 +2405,23 @@ public function activityModel_BeforeCheckPreference_handler($sender, $args) { $isClientManager = count(array_intersect($currentProjectRoles, ["client manager"])) > 0; if($isClientManager) { $activity['Data']['EmailUrl'] = val('EmbedUrl',$data); + $activity['Data']['EmailTemplate'] = 'email-selfservice'; + $category = CategoryModel::categories($challengeID); + $categoryName = val('Name', $category); + $headline = 'Message From a Topcoder Member on Your Work - Please See'; + $activity['HeadlineFormat'] = $headline; + $activity['Headline'] = $headline; + $activity['Story']= sprintf('A new message has been posted on your work forum tied to your Topcoder Work "%s". You can read the full message below.
+To answer, click here to be taken to this discussion.
+Please do not reply to this email.
+Thank you! +The Topcoder Team', $categoryName); return; } } } $activity['Data']['EmailUrl'] = externalUrl(val('Route', $activity) == '' ? '/' : val('Route', $activity)); + $activity['Data']['EmailTemplate'] = 'email-basic'; } }