We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9351f0a commit d3c36b3Copy full SHA for d3c36b3
1 file changed
chats/permissions.py
@@ -27,9 +27,9 @@ class IsChatMember(BasePermission):
27
Allows access only to authenticated users.
28
"""
29
30
- def has_permission(self, request, view):
+ def has_permission(self, request, view) -> bool:
31
kwargs = request.parser_context.get("kwargs")
32
33
chat_id: str = kwargs["id"]
34
35
- return str(request.user.id) in chat_id
+ return str(request.user.id) in chat_id.split("_")
0 commit comments