X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FFollowSonePage.java;h=0367f6ac53a90fb8e712445dfb89d5045f8f17c4;hp=bb90ce00cf99ef9b971a3d91e217d207e9fb73c3;hb=62ebf3da00001abb841c92128c4fdb57d0795ee2;hpb=7ec5cf4d41166dab589d026256ee995068577ef2 diff --git a/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java b/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java index bb90ce0..0367f6a 100644 --- a/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/FollowSonePage.java @@ -52,11 +52,8 @@ public class FollowSonePage extends SoneTemplatePage { String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); Sone currentSone = getCurrentSone(request.getToadletContext()); - Sone sone = webInterface.getCore().getSone(soneId); - if (!sone.equals(currentSone)) { - currentSone.addFriend(sone); - webInterface.getCore().saveSone(currentSone); - } + currentSone.addFriend(soneId); + webInterface.getCore().saveSone(currentSone); throw new RedirectException(returnPage); } }