浏览代码

fix push device registration (#4297)

don't try to register a push device when the device is new
it will be registered when the push token is saved

fixes #4296
Stefan Melmuk 1 年之前
父节点
当前提交
0b2383ab56
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/api/identity.rs

+ 3 - 1
src/api/identity.rs

@@ -268,7 +268,9 @@ async fn _password_login(
     }
 
     // register push device
-    register_push_device(&mut device, conn).await?;
+    if !new_device {
+        register_push_device(&mut device, conn).await?;
+    }
 
     // Common
     // ---