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

Handle ORG.MATRIX.MSC3848.ALREADY_JOINED, INSUFFICIENT_POWER when inviting users #9085

Closed
wants to merge 1 commit into from

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Jul 21, 2022

Depends on matrix-org/matrix-js-sdk#2534

This is just a minimal implementation of MSC3848. It's a bit superficial in that we're not really showing more detailed messages here (because the messages already contain the right amount of detail) and in some cases these errors won't be triggered because the client will do state checks before calling the API.


Here's what your changelog entry will look like:

✨ Features

  • Handle ORG.MATRIX.MSC3848.ALREADY_JOINED, INSUFFICIENT_POWER when inviting users (#9085). Contributed by @Half-Shot.

@Half-Shot Half-Shot requested a review from a team as a code owner July 21, 2022 10:39
@Half-Shot Half-Shot changed the title Handle ORG.MATRIX.MSC3848.ALREADY_JOINED and ORG.MATRIX.MSC3848.INSUFFICIENT_POWER Handle ORG.MATRIX.MSC3848.ALREADY_JOINED, INSUFFICIENT_POWER when inviting users Jul 21, 2022
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

One question, but happy to merge if the answer is "no".

errorText = _t('You do not have permission to invite people to this room.');
}
fatal = true;
for (const errcode of [err.unstableErrcode, err.errcode]) {
Copy link
Member

Choose a reason for hiding this comment

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

Any chance we can have some unit tests of this functionality? Or is it already covered (I couldn't find anything)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not tested, but I'd be fine with doing so if I can figure it out :)

Copy link
Member

Choose a reason for hiding this comment

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

Brilliant, thank you. #element-dev might have suggestions if it proves tricky.

@andybalaam andybalaam added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Jul 21, 2022
@Half-Shot Half-Shot self-assigned this Jul 21, 2022
@t3chguy
Copy link
Member

t3chguy commented Oct 16, 2023

Closing as matrix-org/matrix-js-sdk#2534 was abandoned

@t3chguy t3chguy closed this Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants