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

[stable16] Fix messages not loaded when commands are used with the MCU #1808

Merged
merged 3 commits into from
May 13, 2019

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #1801

When fetching chat messages ChatController may not return as many
messages as requested. In the past this meant that there were no more
messages in the room, but since the introduction of commands some
messages may not be returned because they should not be visible to the
participant fetching them. Thus, now the number of returned messages
does not mean anything regarding whether there are still more messages
in the room or not, but this can be known by looking for a "304 Not
modified" response (which is only sent when there are no more messages
in the room).

When no MUC is used the chat messages are polled again and again, so the
behaviour change explained above made no difference. However, when the
MCU is used the messages are fetched until there are no more messages in
the room and, then, they are only fetched when a new message is sent.
Checking whether there are more messages in the room or not was based on
the number of returned messages, so the fetch of messages until there
were no more messages in the room wrongly stopped when fetching a batch
of messages that included one not visible for the current participant.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@nickvergessen nickvergessen merged commit d1e5ca4 into stable16 May 13, 2019
@nickvergessen nickvergessen deleted the backport/1801/stable16 branch May 13, 2019 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants