Require people replying to diary notifications to be subscribed

This commit is contained in:
Tom Hughes 2018-08-30 18:34:15 +01:00
parent a1b179fa38
commit eeb8bbba49

View file

@ -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+)-(.*)$/)