tijder / SmsMatrix

A simple SMS <--> Matrix bridge.
https://matrix.to/#/#smsmatrix:matrix.org
GNU General Public License v3.0
213 stars 37 forks source link

Upgrade to matrix-android-sdk 0.9.14. #41

Closed fancypantalons closed 5 years ago

fancypantalons commented 5 years ago

There's a bunch of changes, required, to move to the latest SDK:

  1. Update AAR's. The matrix-sdk.aar in this commit was built from the v0.9.14 tag of the matrix-android-sdk git repository. olm-sdk.jar is pulled from the same place.

  2. Updates to the build scripts. matrix-android-sdk added kotlin as a dependency, moved to okhttp3, added io.realm, and so on.

  3. Code modifications to support new SDK itself. The changes, here, are a grab bag, and you're best off just reading the commit.

Of particular note, here, is that LoginRestClient.loginWithUser takes a device name and a device ID, now (the previous API only took a device name). As a wicked hack, right now, I'm just using the name as the ID, but I have no doubt that's wrong and this should be cleaned up to include a randomly generated, persisted device ID, as I believe this is used by Synapse to track login sessions.

tijder commented 5 years ago

Thanks for this merge request! Sorry it took so long to merge.