Store friend Sones as strings, not as Sone objects.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / FollowSonePage.java
index bb90ce0..0367f6a 100644 (file)
@@ -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);
                }
        }