]> git.openstreetmap.org Git - rails.git/commitdiff
Require people replying to diary notifications to be subscribed
authorTom Hughes <tom@compton.nu>
Thu, 30 Aug 2018 17:34:15 +0000 (18:34 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 30 Aug 2018 17:34:15 +0000 (18:34 +0100)
script/deliver-message

index 15a9fbdc7f613f7d14cb9b6119a6dc7719d39afc..98e00d3328bdbab946a0e07f33f529b9182cc4ea 100755 (executable)
@@ -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+)-(.*)$/)