Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PBE-3749] Implement ChatClient::markThreadRead operation. #5447

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

VelikovPetar
Copy link

🎯 Goal

Implement the ChatClient.markThreadRead operation. It will be used as part of the whole Threads V2 implementation.

🛠 Implementation details

  • Extend the MarkReadRequest with thread_id filed (as per the api documentation)
  • Implement new markThreadRead (similar to markMessageRead) methods on ChatClient and ChannelClient

🎨 UI Changes

NA

🧪 Testing

Currently not used

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@VelikovPetar VelikovPetar marked this pull request as ready for review October 18, 2024 08:26
@VelikovPetar VelikovPetar requested a review from a team as a code owner October 18, 2024 08:26
@@ -273,6 +273,7 @@ internal interface ChatApi {
channelType: String,
channelId: String,
messageId: String = "",
threadId: String = "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, this method accept empty messageId to mark the full channel as read, in another case mark the channel read until the messageId.

Now that it contains an extra argument (threadId) it is a bit confusing what it will does if, for example, we pass a messageId and a threadId...

It would be better to have a new markThreadRead() and then extract common logic on the MoshiChatApi to reuse whatever is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants