Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Mar 1, 2019

Follow up to #1588

Before, deleting a room and removing oneself from a room had the same behaviour: if the room was the active one it was first left and, then, the room was destroyed. However, while that still happens when deleting a room, when removing oneself from a room now the room is first destroyed and, then, the room is left; as destroying the room can be rejected by the server it is necessary to wait until the room is destroyed to leave it and update the UI accordingly.

The empty content view expected that a room was always left before being destroyed, so the change in the order of events caused that when the room was destroyed the initial message was set, but when it was then left the initial message was overwritten with the conversation ended message; now the conversation ended messsage is set only if the room was not destroyed before it is left, which fixes the wrong behaviour when removing oneself from a room without affecting the behaviour when rooms are destroyed or the user is removed by a moderator from a room.

Before, deleting a room and removing oneself from a room had the same
behaviour: if the room was the active one it was first left and, then,
the room was destroyed. However, while that still happens when deleting
a room, when removing oneself from a room now the room is first
destroyed and, then, the room is left; as destroying the room can be
rejected by the server it is necessary to wait until the room is
destroyed to leave it and update the UI accordingly.

The empty content view expected that a room was always left before being
destroyed, so the change in the order of events caused that when the
room was destroyed the initial message was set, but when it was then
left the initial message was overwritten with the conversation ended
message; now the conversation ended messsage is set only if the room was
not destroyed before it is left, which fixes the wrong behaviour when
removing oneself from a room without affecting the behaviour when rooms
are destroyed or the user is removed by a moderator from a room.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Makes sense

@nickvergessen
Copy link
Member

--- Failed scenarios:

/drone/src/github.com/nextcloud/server/apps/spreed/tests/acceptance/features/app-files.feature:71

Is that related?

@danxuliu
Copy link
Member Author

danxuliu commented Mar 1, 2019

Is that related?

It passes when run in local, so it looks like a hiccup/race condition.

@nickvergessen nickvergessen merged commit dde7676 into master Mar 1, 2019
@nickvergessen nickvergessen deleted the fix-empty-content-message-when-leaving-a-room branch March 1, 2019 13:35
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.

4 participants