From 88753c201dcfc314a5bf6d9dfc2b88a4271527a9 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Mon, 12 May 2025 21:53:27 +0200 Subject: [PATCH] Check if push_uuid is empty and generate when needed Signed-off-by: BlackDex --- src/db/models/device.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/db/models/device.rs b/src/db/models/device.rs index ea4e25ab..129699a4 100644 --- a/src/db/models/device.rs +++ b/src/db/models/device.rs @@ -93,6 +93,11 @@ impl Device { let time_now = Utc::now(); self.updated_at = time_now.naive_utc(); + // Generate a random push_uuid so if it doesn't already have one + if self.push_uuid.is_none() { + self.push_uuid = Some(PushId(get_uuid())); + } + // --- // Disabled these keys to be added to the JWT since they could cause the JWT to get too large // Also These key/value pairs are not used anywhere by either Vaultwarden or Bitwarden Clients