@@ -1054,7 +1054,15 @@ public function email(&$activity, $options = []) {
1054
1054
$ email ->subject ($ subject );
1055
1055
$ email ->to ($ user );
1056
1056
1057
- $ url = externalUrl (val ('Route ' , $ activity ) == '' ? '/ ' : val ('Route ' , $ activity ));
1057
+ logMessage (__FILE__ , __LINE__ , 'ActivityModels ' , '!!!!!!!!!! ' , "" .$ activity ['Data ' ]['EmailUrl ' ]);
1058
+
1059
+ // FIX https://github.com/topcoder-platform/forums/issues/662
1060
+ if ($ activity ['Data ' ]['EmailUrl ' ]) {
1061
+ $ url = $ activity ['Data ' ]['EmailUrl ' ];
1062
+ } else {
1063
+ $ url = externalUrl (val ('Route ' , $ activity ) == '' ? '/ ' : val ('Route ' , $ activity ));
1064
+ }
1065
+
1058
1066
1059
1067
$ emailTemplate = $ email ->getEmailTemplate ()
1060
1068
->setButton ($ url , val ('ActionText ' , $ activity , t ('Check it out ' )))
@@ -1067,7 +1075,7 @@ public function email(&$activity, $options = []) {
1067
1075
$ email ->setEmailTemplate ($ emailTemplate );
1068
1076
1069
1077
// Fire an event for the notification.
1070
- $ notification = ['ActivityID ' => $ activityID , 'User ' => $ user , 'Email ' => $ email , 'Route ' => $ activity ['Route ' ], 'Story ' => $ activity ['Story ' ], 'Headline ' => $ activity ['Headline ' ], 'Activity ' => $ activity ];
1078
+ $ notification = ['ActivityID ' => $ activityID , 'User ' => $ user , 'Email ' => $ email , 'EmailUrl ' => $ url , ' Route ' => $ activity ['Route ' ], 'Story ' => $ activity ['Story ' ], 'Headline ' => $ activity ['Headline ' ], 'Activity ' => $ activity ];
1071
1079
$ this ->EventArguments = $ notification ;
1072
1080
$ this ->fireEvent ('BeforeSendNotification ' );
1073
1081
0 commit comments