-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading threads with server-side assistance #2735
Conversation
917adb1
to
37b5fa0
Compare
d247b24
to
a230981
Compare
toStartOfTimeline: boolean, | ||
) => { | ||
if (timelineSet && thread.rootEvent) { | ||
if (Thread.hasServerSideSupport) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've recently created feature.ts
and it aims to create a support map that is generated when the client is started as I've noticed that a LOT of places were doing a slightly custom check for their own features
@@ -6658,25 +6841,42 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa | |||
public async doesServerSupportThread(): Promise<{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probs replace this by feature.ts
. Does not need to happen in this PR
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"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the .stable
have only been defined for msc3440
as far as I've read
Thread.setServerSideSupport(threads); | ||
Thread.setServerSideListSupport(list); | ||
Thread.setServerSideFwdPaginationSupport(fwdPagination); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of that could be replaced by feature.ts
f988de1
to
e84b7ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great! 👏
We can punt the changes to feature.ts
in a next iteration of work
* Loading threads with server-side assistance ([\matrix-org#2735](matrix-org#2735)). Contributed by @justjanne. * Support sign in + E2EE set up using QR code implementing MSC3886, MSC3903 and MSC3906 ([\matrix-org#2747](matrix-org#2747)). Contributed by @hughns. * Replace `instanceof Array` with `Array.isArray` ([\matrix-org#2812](matrix-org#2812)). Fixes matrix-org#2811. * Emit UnreadNotification event on notifications reset ([\matrix-org#2804](matrix-org#2804)). Fixes element-hq/element-web#23590. * Fix incorrect prevEv being sent in ClientEvent.AccountData events ([\matrix-org#2794](matrix-org#2794)). * Fix build error caused by wrong ts-strict improvements ([\matrix-org#2783](matrix-org#2783)). Contributed by @justjanne. * Encryption should not hinder verification ([\matrix-org#2734](matrix-org#2734)).
Type: Enhancement
Related: matrix-org/matrix-react-sdk#9356
Related: #2602
Here's what your changelog entry will look like:
✨ Features