diff --git a/src/main/java/io/kamax/mxisd/Mxisd.java b/src/main/java/io/kamax/mxisd/Mxisd.java index 1691253..7927d37 100644 --- a/src/main/java/io/kamax/mxisd/Mxisd.java +++ b/src/main/java/io/kamax/mxisd/Mxisd.java @@ -118,7 +118,7 @@ public class Mxisd { idStrategy = new RecursivePriorityLookupStrategy(cfg.getLookup(), ThreePidProviders.get(), bridgeFetcher); pMgr = new ProfileManager(ProfileProviders.get(), clientDns, httpClient); notifMgr = new NotificationManager(cfg.getNotification(), NotificationHandlers.get()); - sessMgr = new SessionManager(cfg.getSession(), cfg.getMatrix(), store, notifMgr, idStrategy, httpClient); + sessMgr = new SessionManager(cfg.getSession(), cfg.getMatrix(), store, notifMgr, idStrategy); invMgr = new InvitationManager(cfg, store, idStrategy, keyMgr, signMgr, resolver, notifMgr, pMgr); authMgr = new AuthManager(cfg, AuthProviders.get(), idStrategy, invMgr, clientDns, httpClient); dirMgr = new DirectoryManager(cfg.getDirectory(), clientDns, httpClient, DirectoryProviders.get()); diff --git a/src/main/java/io/kamax/mxisd/invitation/InvitationManager.java b/src/main/java/io/kamax/mxisd/invitation/InvitationManager.java index ec4d011..53bc1a8 100644 --- a/src/main/java/io/kamax/mxisd/invitation/InvitationManager.java +++ b/src/main/java/io/kamax/mxisd/invitation/InvitationManager.java @@ -111,11 +111,11 @@ public class InvitationManager { this.notifMgr = notifMgr; this.profileMgr = profileMgr; - log.info("Loading saved invites"); + log.debug("Loading saved invites"); Collection ioList = storage.getInvites(); ioList.forEach(io -> { io.getProperties().putIfAbsent(CreatedAtPropertyKey, defaultCreateTs); - log.info("Processing invite {}", GsonUtil.get().toJson(io)); + log.debug("Processing invite {}", GsonUtil.get().toJson(io)); ThreePidInvite invite = new ThreePidInvite( MatrixID.asAcceptable(io.getSender()), io.getMedium(), @@ -127,6 +127,7 @@ public class InvitationManager { ThreePidInviteReply reply = new ThreePidInviteReply(io.getId(), invite, io.getToken(), "", Collections.emptyList()); invitations.put(reply.getId(), reply); }); + log.info("Loaded saved invites"); // FIXME export such madness into matrix-java-sdk with a nice wrapper to talk to a homeserver try { diff --git a/src/main/java/io/kamax/mxisd/session/SessionManager.java b/src/main/java/io/kamax/mxisd/session/SessionManager.java index aea6eb1..9ef169a 100644 --- a/src/main/java/io/kamax/mxisd/session/SessionManager.java +++ b/src/main/java/io/kamax/mxisd/session/SessionManager.java @@ -40,7 +40,6 @@ import io.kamax.mxisd.storage.dao.IThreePidSessionDao; import io.kamax.mxisd.threepid.session.ThreePidSession; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.http.impl.client.CloseableHttpClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,23 +57,18 @@ public class SessionManager { private NotificationManager notifMgr; private LookupStrategy lookupMgr; - // FIXME export into central class, set version - private CloseableHttpClient client; - public SessionManager( SessionConfig cfg, MatrixConfig mxCfg, IStorage storage, NotificationManager notifMgr, - LookupStrategy lookupMgr, - CloseableHttpClient client + LookupStrategy lookupMgr ) { this.cfg = cfg; this.mxCfg = mxCfg; this.storage = storage; this.notifMgr = notifMgr; this.lookupMgr = lookupMgr; - this.client = client; } private ThreePidSession getSession(String sid, String secret) { @@ -128,7 +122,7 @@ public class SessionManager { log.info("Generated new session {} to validate {} from server {}", sessionId, tpid, server); storage.insertThreePidSession(session.getDao()); - log.info("Stored session {}", sessionId, tpid, server); + log.info("Stored session {}", sessionId); log.info("Session {} for {}: sending validation notification", sessionId, tpid); notifMgr.sendForValidation(session); @@ -196,6 +190,7 @@ public class SessionManager { */ log.warn("A remote host attempted to unbind without proper authorization. Request was denied"); + log.warn("See https://github.com/kamax-matrix/mxisd/wiki/mxisd-and-your-privacy for more info"); if (!cfg.getPolicy().getUnbind().getFraudulent().getSendWarning()) { log.info("Not sending notification to 3PID owner as per configuration");