Erweiterungen
This commit is contained in:
@@ -224,10 +224,18 @@ public final class MainLayout extends AppLayout {
|
|||||||
User currentUser = securityService.getCurrentDatabaseUser();
|
User currentUser = securityService.getCurrentDatabaseUser();
|
||||||
|
|
||||||
if (currentUser != null) {
|
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("");
|
String email = Optional.ofNullable(currentUser.getEmail()).map(String::trim).orElse("");
|
||||||
if (!email.isBlank()) {
|
if (!email.isBlank()) {
|
||||||
candidateReceivers.add(email);
|
candidateReceivers.add(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also add full name for backward compatibility
|
||||||
String fullName = ((Optional.ofNullable(currentUser.getFirstname()).orElse("") + " "
|
String fullName = ((Optional.ofNullable(currentUser.getFirstname()).orElse("") + " "
|
||||||
+ Optional.ofNullable(currentUser.getName()).orElse(""))).trim();
|
+ Optional.ofNullable(currentUser.getName()).orElse(""))).trim();
|
||||||
if (!fullName.isBlank()) {
|
if (!fullName.isBlank()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user