Skip to content

Commit

Permalink
Fix #123
Browse files Browse the repository at this point in the history
  • Loading branch information
maxidorius committed May 30, 2019
1 parent 0298f66 commit 92f1034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/kamax/mxisd/lookup/SingleLookupReply.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public SingleLookupReply(SingleLookupRequest request, String mxid) {
}

public SingleLookupReply(SingleLookupRequest request, _MatrixID mxid) {
this(request, mxid, Instant.now(), Instant.ofEpochMilli(0), Instant.ofEpochMilli(253402300799000L));
this(request, mxid, Instant.now(), Instant.now().minusSeconds(60), Instant.now().plusSeconds(5 * 60));
}

public SingleLookupReply(SingleLookupRequest request, _MatrixID mxid, Instant timestamp, Instant notBefore, Instant notAfter) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/kamax/mxisd/session/SessionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Instant;
import java.util.Optional;

import static io.kamax.mxisd.config.SessionConfig.Policy.PolicyTemplate;
Expand Down Expand Up @@ -176,7 +175,7 @@ public SingleLookupReply bind(String sid, String secret, String mxidRaw) {
SingleLookupRequest request = new SingleLookupRequest();
request.setType(session.getThreePid().getMedium());
request.setThreePid(session.getThreePid().getAddress());
return new SingleLookupReply(request, mxid, Instant.now(), Instant.now().minusSeconds(5 * 60), Instant.now().plusSeconds(5 * 60));
return new SingleLookupReply(request, mxid);
}

public void unbind(JsonObject reqData) {
Expand Down

0 comments on commit 92f1034

Please # to comment.