From: Tom Hughes Date: Thu, 30 Aug 2018 17:34:15 +0000 (+0100) Subject: Require people replying to diary notifications to be subscribed X-Git-Tag: live~2924 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/eeb8bbba495ee9be244b3406097a23662a8719e0 Require people replying to diary notifications to be subscribed --- diff --git a/script/deliver-message b/script/deliver-message index 15a9fbdc7..98e00d332 100755 --- a/script/deliver-message +++ b/script/deliver-message @@ -6,7 +6,7 @@ if recipient = ARGV[0].match(/^c-(\d+)-(\d+)-(.*)$/) comment = DiaryComment.find(recipient[1]) digest = comment.digest date = comment.created_at - from = User.find(recipient[2]) + from = comment.diary_entry.subscribers.find(recipient[2]) to = comment.user token = recipient[3] elsif recipient = ARGV[0].match(/^m-(\d+)-(.*)$/)