about summary refs log tree commit diff
path: root/app/services/reblog_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-19 19:20:07 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-19 19:20:07 +0100
commit2b116131d78460e5cbb8eacc30aaaf04106ea0fa (patch)
tree62ff3751b4f94b36335d5bd7d45374e024cd1d19 /app/services/reblog_service.rb
parente2b846f630cae00096a42dffeff759d0ef8e1c3e (diff)
Adding e-mail notifications about mentions, follows, favourites and reblogs. Fixing another mention recording bug
Diffstat (limited to 'app/services/reblog_service.rb')
-rw-r--r--app/services/reblog_service.rb9
1 files changed, 7 insertions, 2 deletions
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