about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-14 19:13:17 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-14 19:13:17 -0600
commit338827514997331e7c21d1ac6a033920a8215a97 (patch)
treee992b1e4aef422b6b0002f3c9a22269a580888be /app/workers
parent2f2bd68094ab0f85e09e65501f847f80840df135 (diff)
avoid setting expirations twice & apply `hidden` attribute in post worker
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/post_status_worker.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/workers/post_status_worker.rb b/app/workers/post_status_worker.rb
index 82f5e78e9..49f1a2c6f 100644
--- a/app/workers/post_status_worker.rb
+++ b/app/workers/post_status_worker.rb
@@ -7,7 +7,7 @@ class PostStatusWorker
     status = Status.find(status_id)
     return false if status.destroyed?
 
-    status.update(options.slice(:visibility, :local_only, :reject_replies).compact)
+    status.update(options.slice(:visibility, :local_only, :reject_replies, :hidden).compact)
     process_mentions_service.call(status, skip_process: true) unless options[:nomentions]
 
     LinkCrawlWorker.perform_async(status.id) unless options[:nocrawl] || status.spoiler_text.present?
@@ -19,8 +19,6 @@ class PostStatusWorker
 
     PollExpirationNotifyWorker.perform_at(status.poll.expires_at, status.poll.id) if status.poll
 
-    status.delete_after = options[:delete_after] if options[:delete_after]
-
     return true if !status.reply? || status.account.id == status.in_reply_to_account_id
     ActivityTracker.increment('activity:interactions')
     return if status.account.following?(status.in_reply_to_account_id)