Reworked MSC1915. Add request validation.

This commit is contained in:
Anatoly Sablin
2019-07-27 15:51:01 +03:00
parent a96920f533
commit a1f64f5159
28 changed files with 419 additions and 236 deletions

View File

@@ -79,9 +79,9 @@ public abstract class GenericTemplateNotificationGenerator extends PlaceholderNo
}
@Override
public String getForFraudulentUnbind(ThreePid tpid) {
log.info("Generating notification content for fraudulent unbind");
return populateForFraudulentUndind(tpid, getTemplateContent(cfg.getSession().getUnbind().getFraudulent()));
public String getForNotificationUnbind(ThreePid tpid) {
log.info("Generating notification content for unbind");
return populateForNotificationUndind(tpid, getTemplateContent(cfg.getSession().getUnbind().getNotification()));
}
}

View File

@@ -37,6 +37,6 @@ public interface NotificationGenerator {
String getForValidation(IThreePidSession session);
String getForFraudulentUnbind(ThreePid tpid);
String getForNotificationUnbind(ThreePid tpid);
}

View File

@@ -127,7 +127,7 @@ public abstract class PlaceholderNotificationGenerator {
.replace("%NEXT_URL%", validationLink);
}
protected String populateForFraudulentUndind(ThreePid tpid, String input) {
protected String populateForNotificationUndind(ThreePid tpid, String input) {
return populateForCommon(tpid, input);
}