Change all copyright headers to include 2012.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / FollowSoneAjaxPage.java
index 5c3e5f4..ce0fd06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - FollowSoneAjaxPage.java - Copyright © 2010 David Roden
+ * Sone - FollowSoneAjaxPage.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,8 +52,8 @@ public class FollowSoneAjaxPage extends JsonPage {
                if (currentSone == null) {
                        return createErrorJsonObject("auth-required");
                }
-               currentSone.addFriend(soneId);
-               webInterface.getCore().touchConfiguration();
+               webInterface.getCore().followSone(currentSone, soneId);
+               webInterface.getCore().markSoneKnown(webInterface.getCore().getSone(soneId));
                return createSuccessJsonObject();
        }