Skip to content

Commit

Permalink
Better logic (cosmetic) for default 3PID notification providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Dor committed Nov 30, 2017
1 parent a1adca7 commit 1581ab9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ public NotificationManager(NotificationConfig cfg, List<INotificationHandler> ha
this.handlers = new HashMap<>();
handlers.forEach(h -> {
log.info("Found handler {} for medium {}", h.getId(), h.getMedium());
String handlerId = cfg.getHandler().get(h.getMedium());
if (StringUtils.isBlank(handlerId) && StringUtils.equals("raw", h.getId()) ||
StringUtils.equals(handlerId, h.getId())) {
String handlerId = cfg.getHandler().getOrDefault(h.getMedium(), "raw");
if (StringUtils.equals(handlerId, h.getId())) {
this.handlers.put(h.getMedium(), h);
}
});
Expand Down

0 comments on commit 1581ab9

Please sign in to comment.