From 4d4e68e123847a6dad9302205a7f153c69a4b53b Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Fri, 17 Nov 2023 10:49:09 -0800 Subject: [PATCH] Ignores non-case messages in case channels when retrieving conversations. --- src/dispatch/conversation/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispatch/conversation/service.py b/src/dispatch/conversation/service.py index 9a27410d1c5f..7553a51f0881 100644 --- a/src/dispatch/conversation/service.py +++ b/src/dispatch/conversation/service.py @@ -30,7 +30,7 @@ def get_by_channel_id_ignoring_channel_type( if not conversation: conversation = query.filter(Conversation.thread_id == thread_id).one_or_none() - if not conversation: + if not conversation and query.count() <= 1: conversation = query.one_or_none() if conversation: