Merge branch 'deviceid-login' into 'master'

Handle optional device_id field during login

See merge request famedly/conduit!16
This commit is contained in:
Timo Kösters 2021-02-07 12:28:05 +00:00
commit 3588dcd6d0
2 changed files with 19 additions and 10 deletions

View file

@ -252,7 +252,7 @@ impl Users {
}
/// Replaces the access token of one device.
fn set_token(&self, user_id: &UserId, device_id: &DeviceId, token: &str) -> Result<()> {
pub fn set_token(&self, user_id: &UserId, device_id: &DeviceId, token: &str) -> Result<()> {
let mut userdeviceid = user_id.to_string().as_bytes().to_vec();
userdeviceid.push(0xff);
userdeviceid.extend_from_slice(device_id.as_bytes());