Skip to content

Commit

Permalink
workaround to be able to test for now
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Oct 12, 2022
1 parent eb6a054 commit 1e26f43
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6857,20 +6857,25 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
}

try {
const [threadUnstable, threadStable, listUnstable, listStable, threadPagination] = await Promise.all([
const [
threadUnstable, threadStable,
listUnstable, listStable,
fwdPaginationUnstable, fwdPaginationStable,
] = await Promise.all([
this.doesServerSupportUnstableFeature("org.matrix.msc3440"),
this.doesServerSupportUnstableFeature("org.matrix.msc3440.stable"),
this.doesServerSupportUnstableFeature("org.matrix.msc3856"),
this.doesServerSupportUnstableFeature("org.matrix.msc3856.stable"),
this.doesServerSupportUnstableFeature("org.matrix.msc3715"),
this.doesServerSupportUnstableFeature("org.matrix.msc3715.stable"),
]);

// TODO: Use `this.isVersionSupported("v1.3")` for whatever spec version includes MSC3440 formally.

return {
threads: determineFeatureSupport(threadStable, threadUnstable),
list: determineFeatureSupport(listStable, listUnstable),
fwdPagination: determineFeatureSupport(false, threadPagination),
fwdPagination: this.http.opts.baseUrl.includes("threads-dev.lab.element.dev")
? FeatureSupport.Stable
: determineFeatureSupport(fwdPaginationStable, fwdPaginationUnstable),
};
} catch (e) {
return {
Expand Down

0 comments on commit 1e26f43

Please sign in to comment.