From 8a207f7b8189562fb27304a9d62f6f73a7c95c95 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 2 Dec 2019 22:05:40 -0500 Subject: [PATCH] [+] Use all emails --- src/logic/login-user.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic/login-user.ts b/src/logic/login-user.ts index bc473fa..3b2fda5 100644 --- a/src/logic/login-user.ts +++ b/src/logic/login-user.ts @@ -39,8 +39,8 @@ export default class LoginUser // Generate default avatar if (this.avatarUrl == null || this.avatarUrl == '') { - this.avatarUrl = `https://www.gravatar.com/avatar/${md5(this.emails[0])}?d=` + encodeURIComponent( - `https://ui-avatars.com/api/${this.firstName.charAt(0)}${this.lastName.charAt(0)}/128`); + this.avatarUrl = [...this.emails.map(e => `https://www.gravatar.com/avatar/${md5(e)}?d=404`), + `https://ui-avatars.com/api/${this.firstName.charAt(0)}${this.lastName.charAt(0)}/128`].join(','); } } }