Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix multiinviter user already in room and clean up code #6354

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Jul 12, 2021

Fixes element-hq/element-web#12281

image

Splits the error into already invited/joined as it was a bit muddled

@t3chguy t3chguy requested a review from a team July 12, 2021 10:33
@@ -130,9 +133,14 @@ export default class MultiInviter {
if (!room) throw new Error("Room not found");

const member = room.getMember(addr);
if (member && ['join', 'invite'].includes(member.membership)) {
throw new new MatrixError({
Copy link
Member Author

Choose a reason for hiding this comment

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

this spurious new was the main culprit

Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

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

:shipit:

@t3chguy t3chguy merged commit 7533d8e into develop Jul 12, 2021
@t3chguy t3chguy deleted the t3chguy/fix/12281 branch July 12, 2021 10:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inviting a user who's already in the room no longer gives a sensible error
2 participants