Skip to content

Commit 96fc7f1

Browse files
committed
(core) Skipping docNotifications for users who haven't logged in yet
Summary: Document notifications are not sent to users who haven't logged into grist previously. Test Plan: Updated Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D4681
1 parent b3a8cf0 commit 96fc7f1

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

app/gen-server/lib/homedb/HomeDBManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,7 @@ export class HomeDBManager {
23932393
const orgAccess = orgMapWithMembership[u.id] || null;
23942394
return {
23952395
...this.makeFullUser(u),
2396+
firstLoginAt: undefined, // Not part of PermissionData.
23962397
loginEmail: undefined, // Not part of PermissionData.
23972398
access: docMap[u.id] || null,
23982399
parentAccess: roles.getEffectiveRole(

app/gen-server/lib/homedb/UsersManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export class UsersManager {
201201
ref: user.ref,
202202
locale: user.options?.locale,
203203
prefs: user.prefs?.find((p)=> p.orgId === null)?.prefs,
204+
firstLoginAt: user.firstLoginAt || null,
204205
};
205206
if (user.firstLoginAt) {
206207
result.firstLoginAt = user.firstLoginAt;

test/gen-server/lib/homedb/UsersManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ describe('UsersManager', function () {
464464
picture: input.picture,
465465
ref: input.ref,
466466
locale: someUserLocale,
467-
prefs: prefWithoutOrg.prefs
467+
prefs: prefWithoutOrg.prefs,
468+
firstLoginAt: null,
468469
});
469470
});
470471

0 commit comments

Comments
 (0)