diff --git a/common/src/main/java/ctbrec/sites/bonga/BongaCamsModel.java b/common/src/main/java/ctbrec/sites/bonga/BongaCamsModel.java index 53195f4f..7a83013b 100644 --- a/common/src/main/java/ctbrec/sites/bonga/BongaCamsModel.java +++ b/common/src/main/java/ctbrec/sites/bonga/BongaCamsModel.java @@ -273,7 +273,7 @@ public class BongaCamsModel extends AbstractModel { throw new IOException("Not logged in"); } - String url = getSite().getBaseUrl() + "/friend/add/" + getName(); + String url = getSite().getBaseUrl() + "/follow/" + getName(); LOG.debug("Calling {}", url); RequestBody body = new FormBody.Builder() .add("src", "public-chat") @@ -332,7 +332,7 @@ public class BongaCamsModel extends AbstractModel { throw new IOException("Not logged in"); } - String url = getSite().getBaseUrl() + "/friend/ajax/remove/" + getName() + '/' + getUserId(); + String url = getSite().getBaseUrl() + "/unfollow/" + getName() + '/' + getUserId(); LOG.debug("Calling {}", url); RequestBody body = new FormBody.Builder() .add("_csrf_token", getCsrfToken()) @@ -350,7 +350,7 @@ public class BongaCamsModel extends AbstractModel { if (resp.isSuccessful()) { String msg = resp.body().string(); JSONObject json = new JSONObject(msg); - if (json.optString(STATUS).equals(SUCCESS)) { + if (json.optBoolean(SUCCESS)) { LOG.debug("Follow/Unfollow -> {}", msg); return true; } else {