Skip to content
This repository has been 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
merged 2 commits into from
Oct 6, 2021

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Oct 6, 2021

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.

…is equal to or greater to the requested PL

When configured
@Half-Shot Half-Shot requested a review from a team as a code owner October 6, 2021 15:54
@Half-Shot Half-Shot force-pushed the hs/ignore-greater-pl-scalar branch from b270697 to 8414194 Compare October 6, 2021 15:55
@Half-Shot Half-Shot force-pushed the hs/ignore-greater-pl-scalar branch from 8414194 to 88410a1 Compare October 6, 2021 16:01
@turt2live turt2live added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Oct 6, 2021
@turt2live turt2live merged commit 0f212b2 into develop Oct 6, 2021
@turt2live turt2live deleted the hs/ignore-greater-pl-scalar branch October 6, 2021 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants