element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

Read jitsi server url from .well-known configuration #3456

Open Targunitoth opened 4 years ago

Targunitoth commented 4 years ago

Pull Request Checklist

PR for Issue #3443, depends on SDK Update It would be kind if you could test and improve my PR.

Targunitoth commented 4 years ago

I don't know, what I did wrong to get the Travis Cl build fail. Also I testet my implementation and it seems like there is still a bug, the initUiAndData() Function is not always called. The Problem is to get the non-static String mSession.getHomeServerConfig().getJitsiServerUri().toString(); to the static variable JITSI_SERVER_URL, which is used in 2 companion kotlin functions.

bmarty commented 4 years ago

Unfortunately, the Wellknown configuration returned when user logs in does not contains all the fields that are provided in a classical Wellknown request. The doc has been updated: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login

So I think this will not work. Was it working on your side?

Targunitoth commented 4 years ago

Maybe an SDK Upgrade was needed. Also I think this PR is obsolete due to #3462.

MisterRager commented 4 years ago

We definitely need this patch, too. The one I added is only good for finding currently active widgets, not for gathering information on how to widget if it's not there yet. Sorry for the slow response - I didn't have my personal laptop for a bit.

I could fix the patch if you want to get it landed faster.

Targunitoth commented 4 years ago

Feel free to fix it. I'm currently short on time. The missing link is something like: JITSI_SERVER_URL = mSession.getHomeServerConfig().getJitsiServerUri().toString(); To get a valid session and then get the non-static value into the static variable.