-
Notifications
You must be signed in to change notification settings - Fork 882
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
Chat state manager issue #56
Chat state manager issue #56
Conversation
Cleaned and build
Thanks for your contribution. I'm unsure about this change, but tend to include it. While I make up my mind, could you update your PR so that the commit includes are more meaningful commit message? Describe what you have changed and why. See also https://github.com/igniterealtime/Smack/wiki/Guidelines-for-Smack-Developers-and-Contributors#providing-patches- |
Copying my comments from jdev so they don't get lost: There is no easy way to distinguish offline messages from messages that have gotten delayed for a different reason, the presence of XEP-0160 is only "Informational", there might be good reasons to store chat states, for example to determine whether you message has been seen by your contact. |
Actually for something like composing state I would like to drop it when XEP-0198 resume is there. It should be real time. For something like paused/active state it can be useful but again keep showing istyping on client for that long time is not great. I myself taking care of it by using a delayed runnable to update the state in case no done/paused state arrives. Again using active and inactive state to determine seen is nice and we need delayed element to determine which all messages are seen (I used a separate namespace with message to determine that). But getting ghost message like A is composing even after A is offline for last 5 hours is very bad experience. With current chat state listener there is no way to filter out message since only chat and chatstate. One workaround is to not use chatstate listener and write your custom logic inside message listener with check for that namespace. Do you think if we can pass delayedtime to chatstatechanged method. The client will then accordingly take the action. |
I was thinking along these lines as solution. But typically you would not only pass a DelayedInformation reference down the user, but simply the whole message stanza. So
becomes
@bangarharshit Would you volunteer to write the patch for this? :) |
Just saw this one :) and wanted to give 👍 for it, as we are already using this in our patched smack 3.2 version :). (stateChanged(Chat, ChatState, Message)) |
Thanks @damencho Tracking this as SMACK-704. |
Hey Flow, |
Great, please make sure to include the issue key SMACK-704 somewhere in the commit message, e.g. "Fixes SMACK-704". |
Sure 👍 |
ping |
Fixed with 0761fe0 |
Many servers like ejabberd allows messages with empty body to be stored offline. XEP-160 is not correctly implemented since they are also storing chatstates - processone/ejabberd#842
With customchatlistener there is no way to remove states which are from offline stores since message is not passed to onstatechanged. So in chatstatemanager removing any chatstate which have delay element.