-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Support Futures via widgets #4311
Conversation
Putting this back into draft until the widget API is up-to-speed with the recent revisions to MSC4140. |
43327d1
to
cddac44
Compare
I'll take this out of draft once the dependent widget-api PR is merged. |
Not quite -- it would be nice if the widget-api's release workflow could be fixed before cutting a new release for it, which this PR will depend on. |
After the rebasing, the effective changes since the last review start from 3c65057. |
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.
Looks very good
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.
One non-blocking comment:
if (!(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4140_DELAYED_EVENTS))) { | ||
throw Error("Server does not support the delayed events API"); | ||
} |
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.
It feels a little surprising that the host client might approve the capability without having server support. (I would expect this check to be the host's responsibility, ideally)
@@ -268,7 +268,8 @@ describe("MSC4108SignInWithQR", () => { | |||
it("should abort if device doesn't come up by timeout", async () => { | |||
jest.spyOn(global, "setTimeout").mockImplementation((fn) => { | |||
(<Function>fn)(); | |||
return -1; | |||
// TODO: mock timers properly | |||
return -1 as any; |
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.
Why are these needed now but weren't before?
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'm not actually sure...it must be due to a dependency update. Typechecks expect the return value to be a NodeJS Timeout instead of a timeout ID.
Signed-off-by: Andrew Ferrazzutti andrewf@element.io
Dependencies:
Checklist
public
/exported
symbols have accurate TSDoc documentation.