Skip to content

Commit

Permalink
Merge pull request #11 from NullIsNot0/master
Browse files Browse the repository at this point in the history
Load DNS overwrite config on startup and remove duplicates from identity store before email notifications
  • Loading branch information
ma1uta authored Jan 9, 2020
2 parents 15db563 + be915ae commit 0d6f65b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ private void processForUserIdInvite(String roomId, _MatrixID sender, _MatrixID i
.collect(Collectors.toList());
log.info("Found {} email(s) in identity store for {}", tpids.size(), inviteeId);

for (_ThreePid tpid : tpids) {
log.info("Removing duplicates from identity store");
List<_ThreePid> uniqueTpids = tpids.stream()
.distinct()
.collect(Collectors.toList());
log.info("There are {} unique email(s) in identity store for {}", uniqueTpids.size(), inviteeId);

for (_ThreePid tpid : uniqueTpids) {
log.info("Found Email to notify about room invitation: {}", tpid.getAddress());
Map<String, String> properties = new HashMap<>();
profiler.getDisplayName(sender).ifPresent(name -> properties.put("sender_display_name", name));
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/kamax/mxisd/config/MxisdConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ public MxisdConfig build() {
getAuth().build();
getAccountConfig().build();
getDirectory().build();
getDns().build();
getExec().build();
getFirebase().build();
getForward().build();
Expand Down

0 comments on commit 0d6f65b

Please sign in to comment.