Don’t set friends directly, use Core’s follow() methods.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / UnfollowSoneAjaxPage.java
index 26f1a11..5d94d52 100644 (file)
@@ -52,8 +52,7 @@ public class UnfollowSoneAjaxPage extends JsonPage {
                if (currentSone == null) {
                        return createErrorJsonObject("auth-required");
                }
-               currentSone.removeFriend(soneId);
-               webInterface.getCore().touchConfiguration();
+               webInterface.getCore().unfollowSone(currentSone, soneId);
                return createSuccessJsonObject();
        }