@@ -603,13 +603,14 @@ public function discussionModel_beforeRecordAdvancedNotification_handler($sender
603
603
if ($ groupName ) {
604
604
$ headline = sprintf ('%s: %s ' , $ groupName , $ headline );
605
605
}
606
- $ data ["HeadlineFormat " ] = $ headline ;
606
+ $ data ['HeadlineFormat ' ] = $ headline ;
607
+ $ data ['ActionText ' ] = 'Open Discussion ' ;
607
608
// Format to Html
608
609
$ message = Gdn::formatService ()->renderQuote ($ discussion ['Body ' ], $ discussion ['Format ' ]);
609
610
// We just converted it to HTML. Make sure everything downstream knows it.
610
611
// Taking this HTML and feeding it into the Rich Format for example, would be invalid.
611
612
$ data ['Format ' ] = 'Html ' ;
612
- $ data [" Story " ] =
613
+ $ data [' Story ' ] =
613
614
'<p>You are watching the category " ' . $ categoryName . '", ' .
614
615
'which was updated ' . $ dateInserted . ' by ' . $ author ->Name . ':<p/> ' .
615
616
'<hr/> ' .
@@ -657,15 +658,16 @@ public function commentModel_beforeRecordAdvancedNotification($sender, $args){
657
658
if ($ groupName ) {
658
659
$ headline = sprintf ('%s: %s ' , $ groupName , $ headline );
659
660
}
660
- $ data ["HeadlineFormat " ] = $ headline ;
661
+ $ data ['ActionText ' ] = 'Open Discussion ' ;
662
+ $ data ['HeadlineFormat ' ] = $ headline ;
661
663
// $data["HeadlineFormat"] = 'The new discussion has been posted in the category ' . $categoryName . '.';
662
664
// Format to Html
663
665
$ discussionStory = condense (Gdn_Format::to ($ discussion ['Body ' ], $ discussion ['Format ' ]));
664
666
$ commentStory = Gdn::formatService ()->renderQuote ($ comment ['Body ' ],$ comment ['Format ' ]);
665
667
// We just converted it to HTML. Make sure everything downstream knows it.
666
668
// Taking this HTML and feeding it into the required format for example, would be invalid.
667
669
$ data ['Format ' ] = 'Html ' ;
668
- $ data [" Story " ] =
670
+ $ data [' Story ' ] =
669
671
'<p>You are watching the discussion " ' . $ discussionName . '" in the category " ' .$ categoryName .'" ' .
670
672
'which was updated ' . $ commentDateInserted . ' by ' . $ commentAuthor ->Name . ':</p> ' .
671
673
'<hr/> ' .
@@ -696,7 +698,8 @@ private function buildEmailGroupLink($group) {
696
698
$ groupName = $ group ->Name ;
697
699
$ groupType = ucfirst (self ::UI [$ group ->Type ]['TypeName ' ]);
698
700
$ color = c ('Garden.EmailTemplate.ButtonTextColor ' );
699
- return sprintf ('<span>%s: %s </span><br/> ' , $ groupType , anchor ($ groupName , url (GroupsPlugin::GROUP_ROUTE . $ group ->GroupID , true ), '' ,
701
+ $ url = $ group ->ChallengeUrl ? url ($ group ->ChallengeUrl , true ) : url (GroupsPlugin::GROUP_ROUTE . $ group ->GroupID , true );
702
+ return sprintf ('<span>%s: %s </span><br/> ' , $ groupType , anchor ($ groupName , $ url , '' ,
700
703
['rel ' => 'noopener noreferrer ' , 'target ' => '_blank ' , 'style ' => 'color: ' . $ color ]));
701
704
}
702
705
return '' ;
0 commit comments