stream-chat 4.17.0__tar.gz → 4.18.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {stream-chat-4.17.0/stream_chat.egg-info → stream-chat-4.18.0}/PKG-INFO +2 -2
  2. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/__pkg__.py +1 -1
  3. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/async_chat/channel.py +4 -0
  4. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/channel.py +14 -0
  5. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/channel.py +4 -0
  6. {stream-chat-4.17.0 → stream-chat-4.18.0/stream_chat.egg-info}/PKG-INFO +2 -2
  7. {stream-chat-4.17.0 → stream-chat-4.18.0}/LICENSE +0 -0
  8. {stream-chat-4.17.0 → stream-chat-4.18.0}/MANIFEST.in +0 -0
  9. {stream-chat-4.17.0 → stream-chat-4.18.0}/README.md +0 -0
  10. {stream-chat-4.17.0 → stream-chat-4.18.0}/pyproject.toml +0 -0
  11. {stream-chat-4.17.0 → stream-chat-4.18.0}/setup.cfg +0 -0
  12. {stream-chat-4.17.0 → stream-chat-4.18.0}/setup.py +0 -0
  13. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/__init__.py +0 -0
  14. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/async_chat/__init__.py +0 -0
  15. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/async_chat/campaign.py +0 -0
  16. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/async_chat/client.py +0 -0
  17. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/async_chat/segment.py +0 -0
  18. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/__init__.py +0 -0
  19. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/campaign.py +0 -0
  20. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/client.py +0 -0
  21. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/exceptions.py +0 -0
  22. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/base/segment.py +0 -0
  23. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/campaign.py +0 -0
  24. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/client.py +0 -0
  25. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/py.typed +0 -0
  26. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/segment.py +0 -0
  27. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/__init__.py +0 -0
  28. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/base.py +0 -0
  29. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/campaign.py +0 -0
  30. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/rate_limit.py +0 -0
  31. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/segment.py +0 -0
  32. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat/types/stream_response.py +0 -0
  33. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat.egg-info/SOURCES.txt +0 -0
  34. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat.egg-info/dependency_links.txt +0 -0
  35. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat.egg-info/not-zip-safe +0 -0
  36. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat.egg-info/requires.txt +0 -0
  37. {stream-chat-4.17.0 → stream-chat-4.18.0}/stream_chat.egg-info/top_level.txt +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stream-chat
3
- Version: 4.17.0
3
+ Version: 4.18.0
4
4
  Summary: Client for Stream Chat.
5
5
  Home-page: https://github.com/GetStream/stream-chat-python
6
6
  Author: Tommaso Barbugli
7
7
  Author-email: support@getstream.io
8
8
  Project-URL: Bug Tracker, https://github.com/GetStream/stream-chat-python/issues
9
9
  Project-URL: Documentation, https://getstream.io/activity-feeds/docs/python/?language=python
10
- Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.17.0
10
+ Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.18.0
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: Operating System :: OS Independent
@@ -1,6 +1,6 @@
1
1
  __author__ = "Tommaso Barbugli"
2
2
  __copyright__ = "Copyright 2019-2022, Stream.io, Inc"
3
- __version__ = "4.17.0"
3
+ __version__ = "4.18.0"
4
4
  __maintainer__ = "Tommaso Barbugli"
5
5
  __email__ = "support@getstream.io"
6
6
  __status__ = "Production"
@@ -134,6 +134,10 @@ class Channel(ChannelInterface):
134
134
  payload = add_user_id(data, user_id)
135
135
  return await self.client.post(f"{self.url}/read", data=payload)
136
136
 
137
+ async def mark_unread(self, user_id: str, **data: Any) -> StreamResponse:
138
+ payload = add_user_id(data, user_id)
139
+ return await self.client.post(f"{self.url}/unread", data=payload)
140
+
137
141
  async def get_replies(self, parent_id: str, **options: Any) -> StreamResponse:
138
142
  return await self.client.get(f"messages/{parent_id}/replies", params=options)
139
143
 
@@ -277,6 +277,20 @@ class ChannelInterface(abc.ABC):
277
277
  """
278
278
  pass
279
279
 
280
+ @abc.abstractmethod
281
+ def mark_unread(
282
+ self, user_id: str, **data: Any
283
+ ) -> Union[StreamResponse, Awaitable[StreamResponse]]:
284
+ """
285
+ Marks channel as unread from a specific message or thread, if thread_id is provided in data
286
+ a thread will be searched, otherwise a message.
287
+
288
+ :param user_id: the user ID for the event
289
+ :param data: additional data, ie {"message_id": last_message_id} or {"thread_id": thread_id}
290
+ :return: The server response
291
+ """
292
+ pass
293
+
280
294
  @abc.abstractmethod
281
295
  def get_replies(
282
296
  self, parent_id: str, **options: Any
@@ -135,6 +135,10 @@ class Channel(ChannelInterface):
135
135
  payload = add_user_id(data, user_id)
136
136
  return self.client.post(f"{self.url}/read", data=payload)
137
137
 
138
+ def mark_unread(self, user_id: str, **data: Any) -> StreamResponse:
139
+ payload = add_user_id(data, user_id)
140
+ return self.client.post(f"{self.url}/unread", data=payload)
141
+
138
142
  def get_replies(self, parent_id: str, **options: Any) -> StreamResponse:
139
143
  return self.client.get(f"messages/{parent_id}/replies", params=options)
140
144
 
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stream-chat
3
- Version: 4.17.0
3
+ Version: 4.18.0
4
4
  Summary: Client for Stream Chat.
5
5
  Home-page: https://github.com/GetStream/stream-chat-python
6
6
  Author: Tommaso Barbugli
7
7
  Author-email: support@getstream.io
8
8
  Project-URL: Bug Tracker, https://github.com/GetStream/stream-chat-python/issues
9
9
  Project-URL: Documentation, https://getstream.io/activity-feeds/docs/python/?language=python
10
- Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.17.0
10
+ Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.18.0
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: Operating System :: OS Independent
File without changes
File without changes
File without changes
File without changes
File without changes