File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
{ functions } = require ' meteor/simply:external-services-connector'
2
+ { sendHtmlMail } = require ' meteor/emails'
2
3
3
4
Migrations .add
4
5
version : 1
@@ -92,13 +93,27 @@ Migrations.add
92
93
name : ' Mark all non-read messages as notified'
93
94
up : ->
94
95
Messages .update {
95
- isRead : non
96
96
notifiedOn : null
97
97
}, {
98
98
$set : notifiedOn : new Date
99
99
}, {
100
100
multi : yes
101
101
}
102
102
103
+ Migrations .add
104
+ version : 9
105
+ name : ' Send email explaining bug to every person'
106
+ up : ->
107
+ users = Meteor .users .find ({
108
+ ' externalServices.magister' : $exists : true
109
+ }).fetch ()
110
+ for user in users
111
+ sendHtmlMail user, ' Technische storing' , """
112
+ Hey #{ user .profile .firstName } !
113
+
114
+ Door een technische fout hebben we onterecht een groot aantal mails van oude Magister berichten verzonden.
115
+ Onze excuses als dit bij jou ook het geval is en we je inbox overhoop gegooid hebben.
116
+ """
117
+
103
118
Meteor .startup ->
104
119
Migrations .migrateTo ' latest'
You can’t perform that action at this time.
0 commit comments