From 9d55cfc6addd0c6f6d3974fab3d66f09972d9fc5 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 29 Jul 2019 17:40:44 -0500 Subject: fix delayed roars mentions bug, increase delay to 1 minute, include local only prop --- app/services/post_status_service.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/services') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 144cc19c9..a61a4f756 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -59,14 +59,15 @@ class PostStatusService < BaseService else return unless process_status! if @options[:delayed] || @account&.user&.delayed_roars? - delay_until = Time.now.utc + 30.seconds + delay_until = Time.now.utc + 1.minute opts = { visibility: @visibility, + local_only: @local_only, federate: @options[:federate], distribute: @options[:distribute], nocrawl: @options[:nocrawl], nomentions: @options[:nomentions], - delete_after: @delete_after.nil? ? nil : @delete_after + 30.seconds, + delete_after: @delete_after.nil? ? nil : @delete_after + 1.minute, }.compact PostStatusWorker.perform_at(delay_until, @status.id, opts) @@ -165,7 +166,7 @@ class PostStatusService < BaseService return false if @status.destroyed? process_hashtags_service.call(@status, @tags, @preloaded_tags) - process_mentions_service.call(@status) unless @delayed || @options[:nomentions] + process_mentions_service.call(@status) unless @options[:delayed] || @options[:nomentions] return true end -- cgit