From ea9b543d4d0e2cdf2cab0beaf62fc34a9c93dfab Mon Sep 17 00:00:00 2001 From: Nikhil Kothari Date: Fri, 6 Dec 2024 15:13:01 +0530 Subject: [PATCH] fix: perm check for thread DMs --- raven/api/threads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raven/api/threads.py b/raven/api/threads.py index c8d762f0e..eacfc93b7 100644 --- a/raven/api/threads.py +++ b/raven/api/threads.py @@ -94,7 +94,7 @@ def create_thread(message_id): if creator != frappe.session.user: frappe.get_doc( {"doctype": "Raven Channel Member", "channel_id": thread_channel.name, "user_id": creator} - ).insert() + ).insert(ignore_permissions=True) else: # By now, the creator of the thread and the creator of the original message should be added as participants @@ -113,7 +113,7 @@ def create_thread(message_id): "channel_id": thread_channel.name, "user_id": peer_user_id, } - ).insert() + ).insert(ignore_permissions=True) # Update the message to mark it as a thread thread_message.is_thread = 1