Skip to content

Conversation

@danxuliu
Copy link
Member

Follow up to #1344

This fixes the code so it behaves as stated in the documentation.

In practice currently this should make no difference, as in the Files app the user joins the room immediately after getting its token; however, this makes possible to get the token without joining the room, which will be needed in the future to improve the UX of the Files app.

Besides the fix itself the integration tests were adjusted and extended.

The integration tests check that a user can join a file room again after
leaving it, but the user is removed from the room when leaving it due to
how the tests are written; in "the real world" leaving the room does not
remove the user.

The reason is that in the tests the room token is got by one user but
the room is joined by a different user. Currently the user is added to
the room as a permanent participant when getting the token instead of
when joining the room, so in the tests the user that joins the room is a
self-joined user that is removed once she leaves the room; in "the real
world" the user would have needed to get the token of the file room,
which would add her to the room and thus she would not be removed after
leaving, only after explicitly removing herself.

Due to all this the tests were changed to test joining the file room
again after the user removes herself instead of after she leaves the
room.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu added this to the 💚 Next Major milestone Aug 13, 2019
@danxuliu
Copy link
Member Author

/backport to stable16

@danxuliu danxuliu force-pushed the add-user-to-file-room-when-joining-it-instead-of-when-getting-its-token branch from aa9b0a9 to 98ae590 Compare August 13, 2019 11:45
This fixes the code so it behaves as stated in the documentation.

In practice currently this should make no difference, as in the Files
app the user joins the room immediately after getting its token;
however, this makes possible to get the token without joining the room,
which will be needed in the future to improve the UX of the Files app.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu force-pushed the add-user-to-file-room-when-joining-it-instead-of-when-getting-its-token branch from 98ae590 to 878962d Compare August 19, 2019 04:11
@danxuliu danxuliu requested a review from nickvergessen August 22, 2019 20:02
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.

Still works

@nickvergessen nickvergessen merged commit c63217d into master Aug 23, 2019
@delete-merged-branch delete-merged-branch bot deleted the add-user-to-file-room-when-joining-it-instead-of-when-getting-its-token branch August 23, 2019 11:24
@backportbot-nextcloud
Copy link

The backport to stable16 failed. Please do this backport manually.

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.

3 participants