Page MenuHomePhorge

D12389.1768555442.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D12389.1768555442.diff

diff --git a/keyserver/src/socket/session-utils.js b/keyserver/src/socket/session-utils.js
--- a/keyserver/src/socket/session-utils.js
+++ b/keyserver/src/socket/session-utils.js
@@ -251,6 +251,18 @@
return { sessionContinued: false };
}
+ if (oldLastUpdate === 0 && viewer.sessionLastUpdated === 0) {
+ // If both oldLastUpdate and viewer.sessionLastUpdated are 0, that indicates
+ // either a fresh registration, or a fresh login following a policy update
+ // that requires acknowledgment. In the latter case, we don't want to leave
+ // oldLastUpdate as 0, as it might result in a lot of old updates being
+ // downloaded. So we make sure to use Date.now() for the new session, and
+ // return { sessionContinued: false } to make sure the client gets a
+ // stateSyncPayloadTypes.FULL.
+ await setNewSession(viewer, calendarQuery, Date.now());
+ return { sessionContinued: false };
+ }
+
let comparisonResult = null;
try {
comparisonResult = compareNewCalendarQuery(viewer, calendarQuery);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 16, 9:24 AM (15 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5943297
Default Alt Text
D12389.1768555442.diff (1 KB)

Event Timeline