import net.pterodactylus.util.web.RedirectPage;
import net.pterodactylus.util.web.StaticPage;
import net.pterodactylus.util.web.TemplatePage;
+
+import com.google.inject.Inject;
+
import freenet.clients.http.SessionManager;
import freenet.clients.http.SessionManager.Session;
import freenet.clients.http.ToadletContainer;
* @param sonePlugin
* The Sone plugin
*/
+ @Inject
public WebInterface(SonePlugin sonePlugin) {
this.sonePlugin = sonePlugin;
formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
* currently logged in
*/
public Sone getCurrentSone(ToadletContext toadletContext, boolean create) {
- Set<Sone> localSones = getCore().getLocalSones();
+ Collection<Sone> localSones = getCore().getLocalSones();
if (localSones.size() == 1) {
return localSones.iterator().next();
}
*/
@Override
public void newPostFound(Post post) {
- boolean isLocal = getCore().isLocalSone(post.getSone());
+ boolean isLocal = post.getSone().isLocal();
if (isLocal) {
localPostNotification.add(post);
} else {
*/
@Override
public void newReplyFound(PostReply reply) {
- boolean isLocal = getCore().isLocalSone(reply.getSone());
+ boolean isLocal = reply.getSone().isLocal();
if (isLocal) {
localReplyNotification.add(reply);
} else {