[Flutter] Use deviceName instead of hostName for clients

This commit is contained in:
2025-12-18 14:51:15 +01:00
parent b2de793758
commit 54c4f873fc
6 changed files with 49 additions and 15 deletions

View File

@@ -40,11 +40,11 @@ void setFirebaseToken(String fcmToken) async {
if (client == null) {
// should not really happen - perhaps someone externally deleted the client?
final newClient = await APIClient.addClient(acc, fcmToken, Globals().deviceModel, Globals().version, Globals().hostname, Globals().clientType);
final newClient = await APIClient.addClient(acc, fcmToken, Globals().deviceModel, Globals().version, Globals().nameForClient(), Globals().clientType);
acc.setClientAndClientID(newClient);
await acc.save();
} else {
final newClient = await APIClient.updateClient(acc, client.clientID, fcmToken: fcmToken, agentModel: Globals().deviceModel, name: Globals().hostname, agentVersion: Globals().version);
final newClient = await APIClient.updateClient(acc, client.clientID, fcmToken: fcmToken, agentModel: Globals().deviceModel, name: Globals().nameForClient(), agentVersion: Globals().version);
acc.setClientAndClientID(newClient);
await acc.save();
}