In order that device_id is set when we register a new user (or, for that matter, when we register as a guest), we need to make sure that device_id is set on the temporary MatrixClient which is created before the user is logged in - ie, that created by replaceUsingUrls. In order to achieve this, I've basically removed the distinction between replaceUsingAccessToken and replaceUsingUrls. There is a side-effect in that the temporary MatrixClient now gets an e2e sessionStore, but I don't think that is a bad thing.
4.4 KiB
4.4 KiB