Make websocket pushes more targeted

This commit is contained in:
Jonas Lochmann
2022-09-22 08:49:06 +02:00
parent 613776cbf9
commit 84f6f0df69
78 changed files with 224 additions and 140 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -101,9 +101,10 @@ export const linkMailAddress = async ({ mailAuthToken, deviceAuthToken, parentUs
await notifyClientsAboutChangesDelayed({
familyId,
sourceDeviceId: null,
generalLevel: 1,
targetedLevels: new Map(),
database,
websocket,
isImportant: true,
transaction
})
})
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -68,7 +68,8 @@ export const recoverParentPassword = async ({ database, websocket, password, mai
database,
familyId: userEntry.familyId,
websocket,
isImportant: true,
generalLevel: 2,
targetedLevels: new Map(),
sourceDeviceId: null,
transaction
})
+3 -2
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -80,7 +80,8 @@ export const signInIntoFamily = async ({ database, mailAuthToken, newDeviceInfo,
familyId: userEntry.familyId,
websocket,
database,
isImportant: true,
generalLevel: 1,
targetedLevels: new Map(),
sourceDeviceId: deviceId,
transaction
})