Skip to content

Commit a43c979

Browse files
authored
fix: [Application] Embedded in advanced orchestration, internal applications do not authorize external application dialogue users, and internal applications can still be called when conversing from external applications (#4986)
1 parent 26767cc commit a43c979

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/chat/serializers/chat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ def is_valid_chat_user(self):
446446
application_access_token = QuerySet(ApplicationAccessToken).filter(application_id=application_id).first()
447447
if application_access_token and application_access_token.authentication and application_access_token.authentication_value.get(
448448
'type') == 'login':
449+
if chat_user_type == ChatUserType.ANONYMOUS_USER.value:
450+
raise ChatException(500, _("The chat user is not authorized."))
449451
if chat_user_type == ChatUserType.CHAT_USER.value and is_auth_chat_user:
450452
is_auth = is_auth_chat_user(chat_user_id, application_id)
451453
if not is_auth:

0 commit comments

Comments
 (0)