about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-29 17:40:44 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-29 17:40:44 -0500
commit9d55cfc6addd0c6f6d3974fab3d66f09972d9fc5 (patch)
treec05497152316c08dc334ed1d958cc0f40e2f2ec0 /app
parent6fa955e8a1230ffdba48edec0b22129cb80e76e9 (diff)
fix delayed roars mentions bug, increase delay to 1 minute, include local only prop
Diffstat (limited to 'app')
-rw-r--r--app/services/post_status_service.rb7
-rw-r--r--app/workers/post_status_worker.rb7
2 files changed, 7 insertions, 7 deletions
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
diff --git a/app/workers/post_status_worker.rb b/app/workers/post_status_worker.rb
index e9b73b8bc..630d83fae 100644
--- a/app/workers/post_status_worker.rb
+++ b/app/workers/post_status_worker.rb
@@ -9,10 +9,9 @@ class PostStatusWorker
     status = Status.find(status_id)
     return false if status.destroyed?
 
-    if options[:visibility]
-      status.visibility = options[:visibility]
-      status.save!
-    end
+    status.visibility = options[:visibility] if options[:visibility]
+    status.local_only = options[:local_only] if options[:local_only]
+    status.save!
 
     process_mentions_service.call(status) unless options[:nomentions]