remove getInitials from conversation - unused

pull/1344/head
Audric Ackermann 5 years ago
parent d283636fa3
commit 663654ef2c
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -2504,21 +2504,6 @@
return this.id;
},
getInitials(name) {
if (!name) {
return null;
}
const cleaned = name.replace(/[^A-Za-z\s]+/g, '').replace(/\s+/g, ' ');
const parts = cleaned.split(' ');
const initials = parts.map(part => part.trim()[0]);
if (!initials.length) {
return null;
}
return initials.slice(0, 2).join('');
},
isPrivate() {
return this.get('type') === 'private';
},
@ -2537,18 +2522,9 @@
return null;
},
getAvatar() {
const title = this.get('name');
const url = this.getAvatarPath();
if (url) {
return { url };
} else if (this.isPrivate()) {
const symbol = this.isValid() ? '#' : '!';
return {
content: this.getInitials(title) || symbol,
};
}
return { url: null };
return url ? { url } : { url: null };
},
getNotificationIcon() {

Loading…
Cancel
Save