Erweiterungen
This commit is contained in:
@@ -224,10 +224,18 @@ public final class MainLayout extends AppLayout {
|
||||
User currentUser = securityService.getCurrentDatabaseUser();
|
||||
|
||||
if (currentUser != null) {
|
||||
// Add User ID (ObjectId as string) - this is now the primary receiver identifier
|
||||
if (currentUser.getId() != null) {
|
||||
candidateReceivers.add(currentUser.getId().toHexString());
|
||||
}
|
||||
|
||||
// Also add email for backward compatibility with old messages
|
||||
String email = Optional.ofNullable(currentUser.getEmail()).map(String::trim).orElse("");
|
||||
if (!email.isBlank()) {
|
||||
candidateReceivers.add(email);
|
||||
}
|
||||
|
||||
// Also add full name for backward compatibility
|
||||
String fullName = ((Optional.ofNullable(currentUser.getFirstname()).orElse("") + " "
|
||||
+ Optional.ofNullable(currentUser.getName()).orElse(""))).trim();
|
||||
if (!fullName.isBlank()) {
|
||||
|
||||
Reference in New Issue
Block a user