Skip to content

Commit

Permalink
do not use full emails to compute conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
melisabok authored Jun 10, 2024
1 parent 392bb1a commit 899618b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/client/src/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,10 @@ export default class Tools {
let emails = new Set();
let publications = new Set();

if (profile.content?.emails?.[0]?.startsWith('****@')) {
throw new Error('You do not have the required permissions as some emails are obfuscated. Please login with the correct account or contact support.');
}

// Emails section
for (const email of (profile.content?.emails || [])) {
const domain = email.split('@')[1];
domains.add(domain);
emails.add(email);
}

let cutOffYear = -1;
Expand Down Expand Up @@ -609,10 +604,6 @@ export default class Tools {
cutOffYear = cutoffDate.getFullYear();
}

if (profile.content?.emails?.[0]?.startsWith('****@')) {
throw new Error('You do not have the required permissions as some emails are obfuscated. Please login with the correct account or contact support.');
}

// Institution section, get history within the last n years, excluding internships
for (const history of (profile.content?.history || [])) {
const position = history.position;
Expand Down Expand Up @@ -645,11 +636,6 @@ export default class Tools {
for (const email of (profile.content?.emails || [])) {
const domain = email.split('@')[1];
domains.add(domain);
emails.add(email);
}
} else {
for (const email of (profile.content?.emails || [])) {
emails.add(email);
}
}

Expand Down

0 comments on commit 899618b

Please sign in to comment.