Add extra placeholders for Matrix ID room invites notifications

- Sender display name, if available
- Room name, if available
This commit is contained in:
Max Dor
2018-10-09 02:47:15 +02:00
parent b3aefbed77
commit 3eee4eaccf
23 changed files with 577 additions and 176 deletions

View File

@@ -1,6 +1,6 @@
/*
* mxisd - Matrix Identity Server Daemon
* Copyright (C) 2018 Maxime Dor
* Copyright (C) 2018 Kamax Sarl
*
* https://www.kamax.io/
*
@@ -76,6 +76,11 @@ public class MemoryIdentityStore implements AuthenticatorProvider, IDirectoryPro
return cfg.isEnabled();
}
@Override
public Optional<String> getDisplayName(_MatrixID mxid) {
return findByUsername(mxid.getLocalPart()).map(MemoryIdentityConfig::getDisplayName);
}
private UserDirectorySearchResult search(
Predicate<MemoryIdentityConfig> predicate,
Function<MemoryIdentityConfig, UserDirectorySearchResult.Result> mapper