Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions stream_chat/async_chat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,22 @@ async def query_banned_users(self, query_conditions: Dict) -> StreamResponse:
"query_banned_users", params={"payload": json.dumps(query_conditions)}
)

async def query_future_channel_bans(self, **options: Any) -> StreamResponse:
"""
Query future channel bans created by a user.

:param options: Optional parameters including:
- user_id: The ID of the user who created the bans
- exclude_expired_bans: Whether to exclude expired bans
- limit: Maximum number of results to return
- offset: Number of results to skip

:return: A StreamResponse containing the list of future channel bans
"""
return await self.get(
"query_future_channel_bans", params={"payload": json.dumps(options)}
)

async def block_user(
self, blocked_user_id: str, user_id: str, **options: Any
) -> StreamResponse:
Expand Down
17 changes: 17 additions & 0 deletions stream_chat/base/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,23 @@ def query_banned_users(
"""
pass

@abc.abstractmethod
def query_future_channel_bans(
self, **options: Any
) -> Union[StreamResponse, Awaitable[StreamResponse]]:
"""
Query future channel bans created by a user.

:param options: Optional parameters including:
- user_id: The ID of the user who created the bans
- exclude_expired_bans: Whether to exclude expired bans
- limit: Maximum number of results to return
- offset: Number of results to skip

:return: A StreamResponse containing the list of future channel bans
"""
pass

@abc.abstractmethod
def block_user(
self, blocked_user_id: str, user_id: str, **options: Any
Expand Down
16 changes: 16 additions & 0 deletions stream_chat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,22 @@ def query_banned_users(self, query_conditions: Dict) -> StreamResponse:
"query_banned_users", params={"payload": json.dumps(query_conditions)}
)

def query_future_channel_bans(self, **options: Any) -> StreamResponse:
"""
Query future channel bans created by a user.

:param options: Optional parameters including:
- user_id: The ID of the user who created the bans
- exclude_expired_bans: Whether to exclude expired bans
- limit: Maximum number of results to return
- offset: Number of results to skip

:return: A StreamResponse containing the list of future channel bans
"""
return self.get(
"query_future_channel_bans", params={"payload": json.dumps(options)}
)

def block_user(
self, blocked_user_id: str, user_id: str, **options: Any
) -> StreamResponse:
Expand Down