use prefered username as fallback if no account name is provided

instead of falling back directly to the full account id (@userid@example.com) use the prefered username if available

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/1069/head
Robin Appelman 2020-10-12 17:48:36 +02:00
rodzic b56732b343
commit 6158665a33
1 zmienionych plików z 3 dodań i 0 usunięć
src/components

Wyświetl plik

@ -137,6 +137,9 @@ export default {
if (typeof this.accountInfo.name !== 'undefined' && this.accountInfo.name !== '') {
return this.accountInfo.name
}
if (typeof this.accountInfo.preferredUsername !== 'undefined' && this.accountInfo.preferredUsername !== '') {
return this.accountInfo.preferredUsername
}
return this.account
},
accountInfo: function() {