From 2b116131d78460e5cbb8eacc30aaaf04106ea0fa Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 19 Mar 2016 19:20:07 +0100 Subject: Adding e-mail notifications about mentions, follows, favourites and reblogs. Fixing another mention recording bug --- app/services/reblog_service.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/services/reblog_service.rb') diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index 7078e3aff..606970e23 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -7,8 +7,13 @@ class ReblogService < BaseService reblog = account.statuses.create!(reblog: reblogged_status, text: '') fan_out_on_write_service.(reblog) account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url]) - return reblog if reblogged_status.local? - send_interaction_service.(reblog.stream_entry, reblogged_status.account) + + if reblogged_status.local? + NotificationMailer.reblog(reblogged_status, account).deliver_later + else + send_interaction_service.(reblog.stream_entry, reblogged_status.account) + end + reblog end -- cgit