fix: The conversation user is not authorized to use (#3590)
This commit is contained in:
parent
d8254f9e45
commit
ca073fd0d6
@ -314,6 +314,9 @@ class ChatSerializers(serializers.Serializer):
|
|||||||
application_id = self.data.get('application_id')
|
application_id = self.data.get('application_id')
|
||||||
chat_user_type = self.data.get('chat_user_type')
|
chat_user_type = self.data.get('chat_user_type')
|
||||||
is_auth_chat_user = DatabaseModelManage.get_model("is_auth_chat_user")
|
is_auth_chat_user = DatabaseModelManage.get_model("is_auth_chat_user")
|
||||||
|
application_access_token = QuerySet(ApplicationAccessToken).filter(application_id=application_id).first()
|
||||||
|
if application_access_token and application_access_token.authentication and application_access_token.authentication_value.get(
|
||||||
|
'type') == 'login':
|
||||||
if chat_user_type == ChatUserType.CHAT_USER.value and is_auth_chat_user:
|
if chat_user_type == ChatUserType.CHAT_USER.value and is_auth_chat_user:
|
||||||
is_auth = is_auth_chat_user(chat_user_id, application_id)
|
is_auth = is_auth_chat_user(chat_user_id, application_id)
|
||||||
if not is_auth:
|
if not is_auth:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user