File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
connect/notificationServices Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -43,19 +43,16 @@ function handleScheduledEvents(events, setEventsStatus) {
43
43
44
44
// TODO: consider using templating engine to format the bundle email
45
45
// until there is Sendgrid support for loops in email templates
46
- let emailBody = '<p >Your recent updates on Topcoder Connect</p></br >' ;
46
+ let emailBody = '<h3 >Your recent updates on Topcoder Connect</h3 >' ;
47
47
const eventsByTopics = _ . groupBy ( userEvents , 'data.data.topicId' ) ;
48
+ emailBody += '<ul>' ;
48
49
_ . values ( eventsByTopics ) . forEach ( ( topicEvents ) => {
49
- emailBody += `<p><strong> ${ topicEvents [ 0 ] . data . data . topicTitle } </strong></p>` ;
50
- topicEvents . forEach ( topicEvent => {
51
- const auditData + = `<em><small>By ${ topicEvent . data . data . handle } at ${ topicEvent . data . data . date } </small></em>` ;
52
- emailBody += `<p>${ topicEvent . data . data . post } (${ auditData } )<p>` ;
53
- emailBody += '<br />' ;
54
- } ) ;
55
- // eslint-disable-next-line
56
- emailBody += `<p><a href="http://www.connect.topcoder.com/projects/${ topicEvents [ 0 ] . data . data . projectId } #feed-${ topicEvents [ 0 ] . data . data . topicId } ">Visit message</a> <p>` ;
57
- emailBody += '<br />' ;
50
+ emailBody += '<li>' ;
51
+ emailBody += `<a href="http://www.connect.topcoder.com/projects/${ topicEvents [ 0 ] . data . data . projectId } #feed-${ topicEvents [ 0 ] . data . data . topicId } > ${ topicEvents [ 0 ] . data . data . topicTitle } </a>` ;
52
+ emailBody += `<span style="color:#777777"> - ${ topicEvents . length } updates</span>` ;
53
+ emailBody += '</li>' ;
58
54
} ) ;
55
+ emailBody += '</ul>' ;
59
56
60
57
// data property we define as an array of data from each individual event
61
58
eventMessage . data = { notificationsHTML : emailBody } ;
You can’t perform that action at this time.
0 commit comments