FIX: correct in_thread? message logic (#27151)

A message is in a thread if:
- it has a thread_id
- it is in threading_enabled channel OR the associated thread is marked as `force`
This commit is contained in:
Joffrey JAFFEUX
2024-05-23 11:08:55 +02:00
committed by GitHub
parent f84eda7c8d
commit b3802e12f0
2 changed files with 35 additions and 1 deletions

View File

@ -266,7 +266,7 @@ module Chat
end
def in_thread?
self.thread_id.present? && self.chat_channel.threading_enabled
self.thread_id.present? && (self.chat_channel.threading_enabled || self.thread&.force)
end
def thread_reply?