forked from j62/ctbrec
1
0
Fork 0

Fix follow/unfollow for BongaCams

This commit is contained in:
0xboobface 2020-03-28 13:07:54 +01:00
parent 915be1d4fc
commit 970b9ab574
1 changed files with 3 additions and 3 deletions

View File

@ -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 {