Better logic (cosmetic) for default 3PID notification providers
This commit is contained in:
@@ -46,9 +46,8 @@ public class NotificationManager {
|
|||||||
this.handlers = new HashMap<>();
|
this.handlers = new HashMap<>();
|
||||||
handlers.forEach(h -> {
|
handlers.forEach(h -> {
|
||||||
log.info("Found handler {} for medium {}", h.getId(), h.getMedium());
|
log.info("Found handler {} for medium {}", h.getId(), h.getMedium());
|
||||||
String handlerId = cfg.getHandler().get(h.getMedium());
|
String handlerId = cfg.getHandler().getOrDefault(h.getMedium(), "raw");
|
||||||
if (StringUtils.isBlank(handlerId) && StringUtils.equals("raw", h.getId()) ||
|
if (StringUtils.equals(handlerId, h.getId())) {
|
||||||
StringUtils.equals(handlerId, h.getId())) {
|
|
||||||
this.handlers.put(h.getMedium(), h);
|
this.handlers.put(h.getMedium(), h);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user