syn2mas: fix timestamp conversion on emails

This commit is contained in:
Quentin Gliech committed 2023-11-27 11:04:51 +01:00
1 parent 4a0eadccd5
commit cd8468769e
1 file changed
+2 -4
+2 -4
View File
@@ -255,9 +255,7 @@ export async function migrate(): Promise<void> {
);
continue;
}
const threePidCreatedAt = new Date(
parseInt(`${threePid.added_at}`) * 1000,
);
const threePidCreatedAt = new Date(parseInt(`${threePid.added_at}`));
const masUserEmail: MUserEmail = {
user_email_id: makeUuid(threePidCreatedAt),
user_id: masUser.user_id,
@@ -267,7 +265,7 @@ export async function migrate(): Promise<void> {
if (threePid.validated_at) {
masUserEmail.confirmed_at = new Date(
parseInt(`${threePid.validated_at}`) * 1000,
parseInt(`${threePid.validated_at}`),
);
}