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

Update for js-sdk interface change #12638

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 18, 2024

It's a separate method to force a capabilities fetch as of matrix-org/matrix-js-sdk#4246

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

It's a separate method to force a capabilities fetch as of
matrix-org/matrix-js-sdk#4246
@dbkr dbkr added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Jun 18, 2024
@dbkr dbkr marked this pull request as ready for review June 18, 2024 16:33
@dbkr dbkr requested a review from a team as a code owner June 18, 2024 16:33
@dbkr dbkr requested review from t3chguy and florianduros June 18, 2024 16:33
@@ -55,7 +55,7 @@ export async function getServerVersionFromFederationApi(client: MatrixClient): P

const ServerInfo: React.FC<IDevtoolsProps> = ({ onBack }) => {
const cli = useContext(MatrixClientContext);
const capabilities = useAsyncMemo(() => cli.getCapabilities(true).catch(() => FAILED_TO_LOAD), [cli]);
const capabilities = useAsyncMemo(() => cli.fetchCapabilities().catch(() => FAILED_TO_LOAD), [cli]);
Copy link
Member

Choose a reason for hiding this comment

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

Why fetch over get here? Wouldn't cached be fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure to be honest, the code seems to think it's necessary though: I'm just aiming for maintaining the same functionality.

Copy link
Member

Choose a reason for hiding this comment

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

oh yes, true

@dbkr dbkr added this pull request to the merge queue Jun 19, 2024
Merged via the queue into develop with commit b2e9de1 Jun 19, 2024
35 checks passed
@dbkr dbkr deleted the dbkr/fetch_capabilities_background branch June 19, 2024 11:14
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