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

How to be notified for typing events for all channels #4909

Closed
lukicmarko opened this issue Aug 1, 2023 · 3 comments
Closed

How to be notified for typing events for all channels #4909

lukicmarko opened this issue Aug 1, 2023 · 3 comments

Comments

@lukicmarko
Copy link

Describe the bug
I want to be informed whenever someone starts or ends typing in any channel where the current user is a participant.
I tried 2 options, but no callback is called.

SDK version

  • 5.17.6

To Reproduce
Steps to reproduce the behavior:
Subscribe to the specific events, but no callback is called.

      viewLifecycleOwner.lifecycleScope.launch {
            chatClient.globalState.typingChannels.collect {
                println("Keys: " + it.keys)
                println("TYPING CHANNELS $it")
            }
        }

        // Add typing start event handling
        chatClient.subscribeFor<TypingStartEvent> { typingStartEvent ->
            // Handle event
            println("TYPING start event $typingStartEvent")

        }

       // Add typing stop event handling
        chatClient.subscribeFor<TypingStopEvent> { typingStopEvent ->
            // Handle event
            println("TYPING end event $typingStopEvent")
        }

Expected behavior
Expect that the methods listed above be called.

Device:

  • Vendor and model: Samsung S8
@lukicmarko lukicmarko added the bug Something isn't working label Aug 1, 2023
@JcMinarro
Copy link
Member

Hello @lukicmarko

Are you "watching" the channels?
TypingStartEvent and TypingStopEvent events are only received for channels that you are already watching.
Watching channels can be achieved by including watch = true when query channels or by individual channel calling ChannelClient.watch()
Here you can find the docs

@JcMinarro JcMinarro added api-question waiting for response Further information is requested and removed bug Something isn't working labels Aug 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

This issue has been automatically closed because there has been no response to our request from the original author. Please don't hesitate to comment on the bug if you have any more information for us - we will reopen it right away! Thanks for your contribution.

@github-actions github-actions bot closed this as completed Aug 9, 2023
@lukicmarko
Copy link
Author

Tnx it works.

@github-actions github-actions bot removed the waiting for response Further information is requested label Aug 15, 2023
@github-actions github-actions bot reopened this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants