From 338827514997331e7c21d1ac6a033920a8215a97 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 14 Feb 2020 19:13:17 -0600 Subject: avoid setting expirations twice & apply `hidden` attribute in post worker --- app/workers/post_status_worker.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/workers') 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) -- cgit