This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Scalar messaging: No-op setBotPower if the current PL is greater than the requested PL. #6912
Merged
Scalar messaging: No-op setBotPower if the current PL is greater than the requested PL. #6912
Conversation
…is equal to or greater to the requested PL When configured
b270697 to
8414194
Compare
8414194 to
88410a1
Compare
turt2live
approved these changes
Oct 6, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Element-side fix to matrix-org/matrix-appservice-slack#622
Currently, when scalar requests a PL change in the room it will attempt to set the PL of the bot to exactly the requested value even if it's greater than what's required. This is often not desirable as it means the request will fail if the user has already given the bot admin permissions, and they will be unable to degrade it.
Instead of introducing a new API to the scalar API, this instead introduces a new key
ignoreIfGreater. When true this will no-op any requests to set a PL to less than the current PL. This shouldn't break any existing integration systems, as the default is still to explicitly set the PL.This change is marked as an internal change (Task), so will not be included in the changelog.
Preview: https://615dc93e2558d24f2d267f2d--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.