about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-11 19:42:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-11 19:42:05 +0100
commit94d21827174c52a6b70ba2e45f098223f5d904fa (patch)
treeea9a16ad1567e139da34cc9bf2f958bdeb778f09 /app/models
parent31c633e528393e4b3ebfdf89d48d50bbe53f7104 (diff)
Resolve issue with rendering authorize/reject Salmon slaps
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/streamable.rb6
-rw-r--r--app/models/follow_request.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/concerns/streamable.rb b/app/models/concerns/streamable.rb
index 58c15cfbc..910736dac 100644
--- a/app/models/concerns/streamable.rb
+++ b/app/models/concerns/streamable.rb
@@ -30,8 +30,12 @@ module Streamable
       false
     end
 
+    def needs_stream_entry?
+      account.local?
+    end
+
     after_create do
-      account.stream_entries.create!(activity: self, hidden: hidden?) if account.local?
+      account.stream_entries.create!(activity: self, hidden: hidden?) if needs_stream_entry?
     end
   end
 end
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb
index 080c686e5..2755ba0ab 100644
--- a/app/models/follow_request.rb
+++ b/app/models/follow_request.rb
@@ -45,6 +45,10 @@ class FollowRequest < ApplicationRecord
     true
   end
 
+  def needs_stream_entry?
+    true
+  end
+
   def title
     if destroyed?
       case @verb