Add mechanism for 3PID invites expiration (#120)
This commit is contained in:
@@ -31,10 +31,42 @@ public class InvitationConfig {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(InvitationConfig.class);
|
||||
|
||||
public static class Expiration {
|
||||
|
||||
private Boolean enabled;
|
||||
private long after;
|
||||
private String resolveTo;
|
||||
|
||||
public Boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public long getAfter() {
|
||||
return after;
|
||||
}
|
||||
|
||||
public void setAfter(long after) {
|
||||
this.after = after;
|
||||
}
|
||||
|
||||
public String getResolveTo() {
|
||||
return resolveTo;
|
||||
}
|
||||
|
||||
public void setResolveTo(String resolveTo) {
|
||||
this.resolveTo = resolveTo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Resolution {
|
||||
|
||||
private boolean recursive = true;
|
||||
private long timer = 1;
|
||||
private long timer = 5;
|
||||
|
||||
public boolean isRecursive() {
|
||||
return recursive;
|
||||
@@ -80,9 +112,18 @@ public class InvitationConfig {
|
||||
}
|
||||
}
|
||||
|
||||
private Expiration expiration = new Expiration();
|
||||
private Resolution resolution = new Resolution();
|
||||
private Policies policy = new Policies();
|
||||
|
||||
public Expiration getExpiration() {
|
||||
return expiration;
|
||||
}
|
||||
|
||||
public void setExpiration(Expiration expiration) {
|
||||
this.expiration = expiration;
|
||||
}
|
||||
|
||||
public Resolution getResolution() {
|
||||
return resolution;
|
||||
}
|
||||
@@ -101,6 +142,7 @@ public class InvitationConfig {
|
||||
|
||||
public void build() {
|
||||
log.info("--- Invite config ---");
|
||||
log.info("Expiration: {}", GsonUtil.get().toJson(getExpiration()));
|
||||
log.info("Resolution: {}", GsonUtil.get().toJson(getResolution()));
|
||||
log.info("Policies: {}", GsonUtil.get().toJson(getPolicy()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user