mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(api): keep activity tracking out of the registration critical path (#1629)
This commit is contained in:
1 parent
2bb4c92f2b
commit
235399cfd6
2 files changed
+6
-2
No files matched your search
@@ -291,7 +291,6 @@ export async function register(
|
||||
last_voice_activity_sharing_change_at: null,
|
||||
version: 1,
|
||||
});
|
||||
await kvActivityTracker.updateActivity(user.id, now);
|
||||
await users.upsertSettings(
|
||||
UserSettings.getDefaultUserSettings({
|
||||
userId,
|
||||
@@ -300,6 +299,9 @@ export async function register(
|
||||
theme: data.theme,
|
||||
}),
|
||||
);
|
||||
void kvActivityTracker.updateActivity(user.id, now).catch((error: unknown) => {
|
||||
Logger.warn({error, userId: user.id}, 'Failed to update real-time user activity');
|
||||
});
|
||||
const isUnclaimed = !rawEmail;
|
||||
const usernameIsUserChosen = data.username != null || data.global_name != null;
|
||||
const riskResult = await registrationRiskEvaluator.evaluate({
|
||||
|
||||
@@ -529,7 +529,9 @@ export class SsoService {
|
||||
isAdult: true,
|
||||
}),
|
||||
);
|
||||
await this.kvActivityTracker.updateActivity(user.id, now);
|
||||
void this.kvActivityTracker.updateActivity(user.id, now).catch((error: unknown) => {
|
||||
this.logger.warn({error, userId: user.id}, 'Failed to update real-time user activity');
|
||||
});
|
||||
return user;
|
||||
} catch (error) {
|
||||
if (!userCreated) {
|
||||
|
||||
Reference in new issue
Block a user