diff --git a/app/models/jobs/mail_also_commented.rb b/app/models/jobs/mail_also_commented.rb new file mode 100644 index 000000000..af56cd32d --- /dev/null +++ b/app/models/jobs/mail_also_commented.rb @@ -0,0 +1,10 @@ +module Jobs + class MailAlsoCommented + extend ResqueJobLogging + @queue = :mail + def self.perform(recipient_id, sender_id, comment_id) + Notifier.also_commented(recipient_id, sender_id, comment_id).deliver + end + end +end + diff --git a/app/views/notifier/also_commented.html.haml b/app/views/notifier/also_commented.html.haml new file mode 100644 index 000000000..471120c64 --- /dev/null +++ b/app/views/notifier/also_commented.html.haml @@ -0,0 +1,17 @@ +%p + = t('notifier.hello', :name => @receiver.profile.first_name) +%p + = "#{@sender.name} (#{@sender.diaspora_handle})" + = t('.commented', :post_author => @post_author_name) + %br + %br + = @comment.text + + %br + %br + = link_to t('.sign_in'), status_message_url(@comment.post) + + %br + = t('notifier.love') + %br + = t('notifier.diaspora') diff --git a/app/views/notifier/also_commented.text.haml b/app/views/notifier/also_commented.text.haml new file mode 100644 index 000000000..64513bd17 --- /dev/null +++ b/app/views/notifier/also_commented.text.haml @@ -0,0 +1,9 @@ += t('notifier.hello', :name => @receiver.profile.first_name) += "#{@sender.name} (#{@sender.diaspora_handle})" += t('notifier.also_commented.commented') + + += @comment.text + += "#{t('notifier.love')} \n" += t('notifier.diaspora')