Skip to content

Commit

Permalink
[keyserver] Log on keyserver when session recovery is attempted
Browse files Browse the repository at this point in the history
Summary: https://linear.app/comm/issue/ENG-9933/log-on-keyserver-when-session-recovery-is-attempted

Test Plan: Dispatch on mobile an action that starts session recovery and verify it's logged in keyserver

Reviewers: kamil, tomek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13952
  • Loading branch information
graszka22 committed Nov 19, 2024
1 parent 287b768 commit 601de81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions keyserver/src/responders/user-responders.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import {
userSettingsTypes,
notificationTypeValues,
authActionSources,
recoveryFromDataHandlerActionSources,
recoveryFromReduxActionSources,
} from 'lib/types/account-types.js';
import {
type ClientAvatar,
Expand Down Expand Up @@ -781,7 +783,15 @@ async function keyserverAuthResponder(
initialContentEncryptedMessage,
initialNotificationsEncryptedMessage,
doNotRegister,
source,
} = request;
if (
Object.values(recoveryFromReduxActionSources).includes(source) ||
Object.values(recoveryFromDataHandlerActionSources).includes(source)
) {
const data = { userID, source };
console.log(`Session recovery attempted ${JSON.stringify(data)}`);
}
const calendarQuery = normalizeCalendarQuery(request.calendarQuery);

// 1. Check if there's already a user for this userID. Simultaneously, get
Expand Down

0 comments on commit 601de81

Please sign in to comment.