7e/ee/7eeedb92233390493bac404ff00a47078ce5f27ca7e67befc89803decf788e45
Clears ping/page recipients and suppresses alertsRejects notifying rows beside suppressed routing
SHA-2567eeedb92233390493bac404ff00a47078ce5f27ca7e67befc89803decf788e45
MaleculeO(Er)H(Os)
Evidence
1def publish_review(request, row, persist)
2 original = request.dup
3 request = request.dup
4 request["metadata"] = request["metadata"].dup
5 request["ping_recipients"] = []
6 request["page_recipients"] = []
7 request["metadata"]["no_notify"] = true
8 request["metadata"]["notification_suppression"] = {
9 "original_ping_recipients" => original["ping_recipients"],
10 "original_page_recipients" => original["page_recipients"]
11 }
12 row = row.dup
13 row["no_notify"] = true
14 unless row["no_notify"] == true
15 raise "This task must not send notifications"
16 end
17 persist.call(request, row)
18end