Update conversations.php
This commit is contained in:
+8
-5
@@ -2868,12 +2868,15 @@ if (!isUserLoggedIn()) {
|
||||
}
|
||||
|
||||
getInitials(name) {
|
||||
if (!name) return '?';
|
||||
const parts = name.split(' ');
|
||||
if (parts.length >= 2) {
|
||||
return (parts[0][0] + parts[1][0]).toUpperCase();
|
||||
if (!name || typeof name !== 'string') return '?';
|
||||
const parts = name.trim().split(/\s+/);
|
||||
if (parts.length >= 2 && parts[0] && parts[1]) {
|
||||
return ((parts[0][0] || '') + (parts[1][0] || '')).toUpperCase();
|
||||
}
|
||||
return name.substring(0, 2).toUpperCase();
|
||||
if (parts[0]) {
|
||||
return parts[0].substring(0, 2).toUpperCase();
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
|
||||
formatTime(dateString) {
|
||||
|
||||
Reference in New Issue
Block a user