Skip to content

Commit d3c36b3

Browse files
committed
fix chat permission
1 parent 9351f0a commit d3c36b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

chats/permissions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class IsChatMember(BasePermission):
2727
Allows access only to authenticated users.
2828
"""
2929

30-
def has_permission(self, request, view):
30+
def has_permission(self, request, view) -> bool:
3131
kwargs = request.parser_context.get("kwargs")
3232

3333
chat_id: str = kwargs["id"]
3434

35-
return str(request.user.id) in chat_id
35+
return str(request.user.id) in chat_id.split("_")

0 commit comments

Comments
 (0)