Skip to content

Fix session manager button erroneously appearing when the homeserver does not support it#1056

Closed
770grappenmaker wants to merge 2 commits into
SableClient:devfrom
770grappenmaker:fix-session-dashlink
Closed

Fix session manager button erroneously appearing when the homeserver does not support it#1056
770grappenmaker wants to merge 2 commits into
SableClient:devfrom
770grappenmaker:fix-session-dashlink

Conversation

@770grappenmaker

Copy link
Copy Markdown
Contributor

Description

Title probably is clear enough. If a homeserver does not report org.matrix.sessions_list in account_management_actions_supported at the /_matrix/client/v1/auth_metadata endpoint, the session manager is not supported, and it shouldn't be assumed to exist just because the hs supports nextgen auth.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

None of that AI stuff, i am hooman

(state: typeof deleteState) => {
if (state.status === AsyncStatus.Success) {
setDeleted(new Set());
refreshDeviceList();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems my editor inserted this void keyword, which probably does nothing, wat.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Explicitly ignores the result of refreshDeviceList in this case.


// check for MSC4191 support for account deeplink, in particular the sessions list
const actionsSupported = authMetadata?.account_management_actions_supported ?? [];
const supportsSessionManager = actionsSupported.includes('org.matrix.sessions_list');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

org.matrix.sessions_list was the unstable prefix, the merged one is org.matrix.devices_list, so we should probably check for either of those

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Aha, I have misunderstood the problem I think, the reason I went about it this way is that Continuwuity does not support sessions_list, yet this is explicitly used in the code. I'll fix this, so that if either one is available, that one is picked.

@7w1 7w1 Jul 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tbh I don't actually know exactly what the error you're facing is, but I guess it might have inadvertently been solved by #1060 since i swapped over to the stable keys after seeing your PR, I think all implementations support the merged keys

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In theory the action may not be supported, but indeed your PR solves my issue too

@770grappenmaker

770grappenmaker commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

That should probably do it. Tested, but unsure of the correctness for other HS implementations other than Continuwuity.

@770grappenmaker

Copy link
Copy Markdown
Contributor Author

Have to admit, not the cleanest thing ever, probably could refactor out generating these actions given metadata.

@770grappenmaker

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants