diff --git a/stream_chat/async_chat/channel.py b/stream_chat/async_chat/channel.py index a66fb7f..458417d 100644 --- a/stream_chat/async_chat/channel.py +++ b/stream_chat/async_chat/channel.py @@ -195,7 +195,9 @@ async def hide(self, user_id: str) -> StreamResponse: async def show(self, user_id: str) -> StreamResponse: return await self.client.post(f"{self.url}/show", data={"user_id": user_id}) - async def mute(self, user_id: str, expiration: int = None) -> StreamResponse: + async def mute( + self, user_id: str, expiration: Optional[int] = None + ) -> StreamResponse: params: Dict[str, Union[str, int]] = { "user_id": user_id, "channel_cid": self.cid, diff --git a/stream_chat/async_chat/client.py b/stream_chat/async_chat/client.py index ce07f6d..1f315b0 100644 --- a/stream_chat/async_chat/client.py +++ b/stream_chat/async_chat/client.py @@ -325,7 +325,7 @@ async def translate_message(self, message_id: str, language: str) -> StreamRespo ) async def pin_message( - self, message_id: str, user_id: str, expiration: int = None + self, message_id: str, user_id: str, expiration: Optional[int] = None ) -> StreamResponse: updates = { "set": { diff --git a/stream_chat/base/channel.py b/stream_chat/base/channel.py index 8e300a5..feb8ac3 100644 --- a/stream_chat/base/channel.py +++ b/stream_chat/base/channel.py @@ -420,7 +420,7 @@ def show(self, user_id: str) -> Union[StreamResponse, Awaitable[StreamResponse]] @abc.abstractmethod def mute( - self, user_id: str, expiration: int = None + self, user_id: str, expiration: Optional[int] = None ) -> Union[StreamResponse, Awaitable[StreamResponse]]: """ Mutes a channel. diff --git a/stream_chat/base/client.py b/stream_chat/base/client.py index c6f2d94..ed3628a 100644 --- a/stream_chat/base/client.py +++ b/stream_chat/base/client.py @@ -513,7 +513,7 @@ def translate_message( @abc.abstractmethod def pin_message( - self, message_id: str, user_id: str, expiration: int = None + self, message_id: str, user_id: str, expiration: Optional[int] = None ) -> Union[StreamResponse, Awaitable[StreamResponse]]: """ Pins a message. diff --git a/stream_chat/channel.py b/stream_chat/channel.py index 2373811..0c1c813 100644 --- a/stream_chat/channel.py +++ b/stream_chat/channel.py @@ -196,7 +196,7 @@ def hide(self, user_id: str) -> StreamResponse: def show(self, user_id: str) -> StreamResponse: return self.client.post(f"{self.url}/show", data={"user_id": user_id}) - def mute(self, user_id: str, expiration: int = None) -> StreamResponse: + def mute(self, user_id: str, expiration: Optional[int] = None) -> StreamResponse: params: Dict[str, Union[str, int]] = { "user_id": user_id, "channel_cid": self.cid, diff --git a/stream_chat/client.py b/stream_chat/client.py index b9572b1..2d5c98f 100644 --- a/stream_chat/client.py +++ b/stream_chat/client.py @@ -318,7 +318,7 @@ def commit_message(self, message_id: str) -> StreamResponse: return self.post(f"messages/{message_id}/commit") def pin_message( - self, message_id: str, user_id: str, expiration: int = None + self, message_id: str, user_id: str, expiration: Optional[int] = None ) -> StreamResponse: updates = { "set": {