about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-24 13:22:41 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:20 -0500
commit9d35a7aef6f64088dd97446f10aee581f3009af7 (patch)
treef6c2612dcb6fb138d2875bb424a480d318322efb
parentbace8e1ad0d7653ba683611e51ec4efa0e64a457 (diff)
[Bug, Command Tags] Avoid processing deleted statuses
-rw-r--r--app/lib/command_tag/processor.rb2
-rw-r--r--app/services/process_mentions_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb
index 9edcb58ba..5a1f6a68d 100644
--- a/app/lib/command_tag/processor.rb
+++ b/app/lib/command_tag/processor.rb
@@ -91,7 +91,7 @@ class CommandTag::Processor
     all_handlers!(:shutdown)
   rescue CommandTag::Break
     nil
-  rescue StandardError => e
+  rescue StandardError
     @status.update(published: false)
     @status.destroy
     raise
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index ba61e4464..b5134bf9c 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -10,7 +10,7 @@ class ProcessMentionsService < BaseService
   # @option [Enumerable] :mentions Mentions to include
   # @option [Boolean] :deliver Deliver mention notifications
   def call(status, mentions: [], deliver: true)
-    return unless status.local? && !status.frozen?
+    return unless status.local? && !(status.frozen? || status.destroyed?)
 
     @status = status
     @status.text, mentions = ResolveMentionsService.new.call(@status, mentions: mentions)