Skip to content

Commit c22e4cd

Browse files
committed
fix: The conversation user is not authorized to use
1 parent 0743754 commit c22e4cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/chat/serializers/chat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,9 @@ def chat_work_flow(self, chat_info: ChatInfo, instance: dict, base_to_response):
312312
def is_valid_chat_user(self):
313313
chat_user_id = self.data.get('chat_user_id')
314314
application_id = self.data.get('application_id')
315+
chat_user_type = self.data.get('chat_user_type')
315316
is_auth_chat_user = DatabaseModelManage.get_model("is_auth_chat_user")
316-
if self.chat_user_type == ChatUserType.CHAT_USER.value and is_auth_chat_user:
317+
if chat_user_type == ChatUserType.CHAT_USER.value and is_auth_chat_user:
317318
is_auth = is_auth_chat_user(chat_user_id, application_id)
318319
if not is_auth:
319320
raise ChatException(500, _("The chat user is not authorized."))

0 commit comments

Comments
 (0)