Fix session manager button erroneously appearing when the homeserver does not support it#1056
Fix session manager button erroneously appearing when the homeserver does not support it#1056770grappenmaker wants to merge 2 commits into
Conversation
…does not support it
| (state: typeof deleteState) => { | ||
| if (state.status === AsyncStatus.Success) { | ||
| setDeleted(new Set()); | ||
| refreshDeviceList(); |
There was a problem hiding this comment.
It seems my editor inserted this void keyword, which probably does nothing, wat.
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
In theory the action may not be supported, but indeed your PR solves my issue too
|
That should probably do it. Tested, but unsure of the correctness for other HS implementations other than Continuwuity. |
|
Have to admit, not the cleanest thing ever, probably could refactor out generating these actions given metadata. |
|
Closing in favor of #1060 |
Description
Title probably is clear enough. If a homeserver does not report
org.matrix.sessions_listinaccount_management_actions_supportedat the/_matrix/client/v1/auth_metadataendpoint, the session manager is not supported, and it shouldn't be assumed to exist just because the hs supports nextgen auth.Type of change
Checklist:
AI disclosure:
None of that AI stuff, i am hooman