Smack 4.4.3: Add XEP-0085: Chat State Notifications support for group chat

Currently smack 4.4.3 does not support Chat State Notifications during group chat.

see below reference for more info:
XEP-0085: Chat State Notifications
5.5 Use in Groupchat

Attached below is the patch for the ChatStateManager class to support this function with full implementation:

ChatStateManager.patch (8.1 KB)

I’m not sure if I like the change of the Map key type to Object (I’d probably go with two separate maps instead), but I don’t see how it might be harmful either.

It may be a good idea to make the sending behavior configurable (i.e. disable sending updates for group chats only).

If you don’t mind I’d create a PR in your name for more comfortable code review.

Edit: I created #352 with your changes.

Thanks. It is only a proposal. You are welcome to make changes to make it better.

I am not sure if it needs to have an enable/disable option for group chat.
Current if the app (e.g. aTalk) has the chatState notification disabled, the ChatStateManager will only send ‘active’ state one time, then it will automatically block further sending the chat state as there is no further changes to the chat state.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.