Skip to content

Conversation

@nickvergessen
Copy link
Member

…not by participant

Split from #3338 for faster merging

Not sure where participant comes from. I guess a copy paste fail.
userId is used in the rooms getParticipant:

'userId' => (string) $userId,

And the calls getPeers:
'userId' => $participant->getUser(),

The old Room API also had no participant key:

'name' => $user->getDisplayName(),

This should explain and solve some of the "duplicate avatar" issues like #2913

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

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

Changing participant to userId in Participant.vue makes getParticipantIndex work. But... now userId is passed to promoteToModerator which expects the argument to be called participant instead.

I have not checked which other API calls expect participant besides the promoting/demoting ones, so there may be other issues lurking around, I do not know.

@nickvergessen nickvergessen force-pushed the bugfix/noid/refresh-of-room-list-overwrites-joining-a-call branch from 3863d14 to c509ed5 Compare April 27, 2020 08:57
@nickvergessen
Copy link
Member Author

Fixed it

@nickvergessen
Copy link
Member Author

Also checked the others and the only other endpoint with "participant" was already getting it from the userId:

const response = await axios.delete(generateOcsUrl('apps/spreed/api/v1', 2) + `room/${token}/participants`, {
params: {
participant: userId,
},
})

@nickvergessen nickvergessen requested a review from danxuliu April 27, 2020 11:59
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

If possible please squash all the commits in a single one before merging, as technically the last two are just fixups of the first one.

@nickvergessen nickvergessen force-pushed the bugfix/noid/refresh-of-room-list-overwrites-joining-a-call branch from c509ed5 to e530c95 Compare April 27, 2020 20:44
@nickvergessen nickvergessen merged commit b97fc1c into master Apr 27, 2020
@nickvergessen nickvergessen deleted the bugfix/noid/refresh-of-room-list-overwrites-joining-a-call branch April 27, 2020 20:49
@nickvergessen nickvergessen mentioned this pull request May 8, 2020
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