From f4b7c6b61914070e590507bcb33e4345d3f9b0b9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 24 Apr 2021 13:35:39 +0200 Subject: Fix nil error when removing status caused by race condition (#16099) --- app/models/status.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index 74e81f612..847921ac2 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -161,6 +161,10 @@ class Status < ApplicationRecord attributes['local'] || uri.nil? end + def in_reply_to_local_account? + reply? && thread&.account&.local? + end + def reblog? !reblog_of_id.nil? end -- cgit