X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=0df6d79367066c45aeb1147bba2f7b58df361a43;hb=4a19df92edd7da1b5d1b828a34c72f8e34ec738c;hp=13c7157ef3ae018ef0a560b2360551a34150b9f9;hpb=bfd1ce8e6a10346e13e29efd41c9bcfd10d9ce6a;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 13c7157..0df6d79 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -309,6 +309,10 @@ public class WebInterface implements CoreListener { * currently logged in */ public Sone getCurrentSone(ToadletContext toadletContext, boolean create) { + Set localSones = getCore().getLocalSones(); + if (localSones.size() == 1) { + return localSones.iterator().next(); + } return getCurrentSone(getCurrentSession(toadletContext, create)); }