matrix-org / matrix-rust-sdk

Matrix Client-Server SDK for Rust
Apache License 2.0
1.19k stars 235 forks source link

ffi: AuthenticationService treats sliding sync proxy as mandatory #3579

Open Johennes opened 2 months ago

Johennes commented 2 months ago

Calling configure_homeserver on an AuthenticationService instance currently results in an error if there is neither a custom sliding sync proxy nor a sliding sync proxy in the home server's .well-known. It would be great if login was possible on home servers that don't currently support sliding sync. Maybe this could be achieved through an additional parameter in the constructor of AuthenticationService?

bnjbvr commented 2 months ago

You're in luck! Sounds like something @pixlwave's been working on in https://github.com/matrix-org/matrix-rust-sdk/pull/3569 :eyes:

pixlwave commented 2 months ago

Sure am! That PR doesn't change the status quo just yet, but I'm now working on moving all the methods from AuthenticationService directly onto Client, at which point you can build one without calling requires_sliding_sync and bada bing bada boom.

poljar commented 2 months ago

Would that help that much? Large parts of the bindings assume SS support, do we even expose the sync v2 methods?

Johennes commented 2 months ago

[...] I'm now working on moving all the methods from AuthenticationService directly onto Client

Oh, should I be rebasing the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/3558, too, then?

Would that help that much? Large parts of the bindings assume SS support, do we even expose the sync v2 methods?

Good point. I haven't actually looked further into the bindings yet because I'm blocked on logging in due to the PR mentioned above. I suppose the v2 methods could be exposed as well if they're currently missing? Not sure how much hassle that would be though.

poljar commented 2 months ago

Good point. I haven't actually looked further into the bindings yet because I'm blocked on logging in due to the PR mentioned above. I suppose the v2 methods could be exposed as well if they're currently missing? Not sure how much hassle that would be though.

Yeah, it's a good first step but I think you'll have to take a bunch of other steps sadly. Perhaps having the sync method is even enough to have something to play with.

Goodspeed on your quest.

pixlwave commented 2 months ago

Oh, should I be rebasing the changes from #3558, too, then?

Ah yeah, I’ve just seen the PR, yes please (and sorry). I should have a PR up at some stage tomorrow that deletes the AuthenticationService entirely - it’s all in the name of testing all the logic that accumulated in this part of the FFI.