improvement: Handle optional device_id field during login

remove debug logging
This commit is contained in:
Devon Hudson 2021-01-16 22:15:45 -07:00
parent 9424ba0559
commit 890187e004
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628
2 changed files with 27 additions and 10 deletions

View file

@ -251,7 +251,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());