Use display names in avatars

This commit is contained in:
Toby Zerner
2017-10-07 20:10:50 +10:30
parent cb92deee98
commit 06aa37d2fd

View File

@ -19,7 +19,7 @@ export default function avatar(user, attrs = {}) {
// uploaded image, or the first letter of their username if they haven't // uploaded image, or the first letter of their username if they haven't
// uploaded one. // uploaded one.
if (user) { if (user) {
const username = user.username() || '?'; const username = user.displayName() || '?';
const avatarUrl = user.avatarUrl(); const avatarUrl = user.avatarUrl();
if (hasTitle) attrs.title = attrs.title || username; if (hasTitle) attrs.title = attrs.title || username;