From 94d21827174c52a6b70ba2e45f098223f5d904fa Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 11 Feb 2017 19:42:05 +0100 Subject: Resolve issue with rendering authorize/reject Salmon slaps --- app/models/concerns/streamable.rb | 6 +++++- app/models/follow_request.rb | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'app/models') 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 -- cgit