From 352217c5b4f02f00530f4ebf78bf9395db1f31fb Mon Sep 17 00:00:00 2001 From: Rob Colbert Date: Tue, 13 Aug 2019 02:16:01 -0400 Subject: [PATCH] process_quote_service call made conditional --- app/services/post_status_service.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index ecd2c46d..d84d4819 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -68,7 +68,9 @@ class PostStatusService < BaseService process_hashtags_service.call(@status) process_mentions_service.call(@status) - process_quote_service.call(@status) + if @status.quote + process_quote_service.call(@status) + end end def schedule_status! @@ -98,7 +100,7 @@ class PostStatusService < BaseService def validate_group! group_id = @options[:group_id] - + return if group_id.blank? raise GabSocial::ValidationError, I18n.t('statuses.not_a_member_of_group') if not GroupAccount.where(account: @account, group_id: group_id).exists? @@ -121,7 +123,7 @@ class PostStatusService < BaseService def process_quote_service ProcessQuoteService.new end - + def process_mentions_service ProcessMentionsService.new end