Shorten account IDs because they don’t need to be globally unique

This commit is contained in:
Ben Gotow 2017-09-25 12:19:46 -07:00
parent 6368f12a83
commit 93ea673a1d

View file

@ -38,7 +38,7 @@ function idForAccount(emailAddress, connectionSettings) {
}
const idString = `${emailAddress}${JSON.stringify(settingsThatCouldChangeMailContents)}`;
return crypto.createHash('sha256').update(idString, 'utf8').digest('hex');
return crypto.createHash('sha256').update(idString, 'utf8').digest('hex').substr(0, 8);
}
export function expandAccountWithCommonSettings(account) {