Use commentron instead of Comment SDK calls #1149

Merged
kekkyojin merged 2 commits from interacting-comment-servers into master 2021-02-24 16:23:34 +01:00
3 changed files with 131 additions and 40 deletions

View file

@ -7,29 +7,18 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.Objects;
import io.lbry.browser.exceptions.ApiCallException;
import io.lbry.browser.model.Comment;
import io.lbry.browser.utils.Comments;
import io.lbry.browser.utils.Helper;
import io.lbry.browser.utils.Lbry;
import io.lbry.browser.utils.Lbryio;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
private Comment comment;
private View progressView;
private CommentCreateWithTipHandler handler;
private final Comment comment;
private final View progressView;
private final CommentCreateWithTipHandler handler;
private Exception error;
public CommentCreateTask(Comment comment, View progressView, CommentCreateWithTipHandler handler) {
@ -46,29 +35,31 @@ public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
Comment createdComment = null;
try {
// check comments status endpoint
Request request = new Request.Builder().url(STATUS_ENDPOINT).build();
OkHttpClient client = new OkHttpClient.Builder().
writeTimeout(30, TimeUnit.SECONDS).
readTimeout(30, TimeUnit.SECONDS).
build();
Response response = client.newCall(request).execute();
JSONObject status = new JSONObject(response.body().string());
String statusText = Helper.getJSONString("text", null, status);
boolean isRunning = Helper.getJSONBoolean("is_running", false, status);
if (!"ok".equalsIgnoreCase(statusText) || !isRunning) {
throw new ApiCallException("The comment server is not available at this time. Please try again later.");
Comments.checkCommentsEndpointStatus();
JSONObject comment_body = new JSONObject();
comment_body.put("comment", comment.getText());
comment_body.put("claim_id", comment.getClaimId());
if (!Helper.isNullOrEmpty(comment.getParentId())) {
comment_body.put("parent_id", comment.getParentId());
}
comment_body.put("channel_id", comment.getChannelId());
comment_body.put("channel_name", comment.getChannelName());
JSONObject jsonChannelSign = Comments.channelSign(comment_body, comment.getChannelId(), comment.getChannelName());
if (jsonChannelSign.has("signature") && jsonChannelSign.has("signing_ts")) {
comment_body.put("signature", jsonChannelSign.getString("signature"));
comment_body.put("signing_ts", jsonChannelSign.getString("signing_ts"));
}
Map<String, Object> options = new HashMap<>();
options.put("comment", comment.getText());
options.put("claim_id", comment.getClaimId());
options.put("channel_id", comment.getChannelId());
options.put("channel_name", comment.getChannelName());
if (!Helper.isNullOrEmpty(comment.getParentId())) {
options.put("parent_id", comment.getParentId());
}
JSONObject jsonObject = (JSONObject) Lbry.genericApiCall(Lbry.METHOD_COMMENT_CREATE, options);
createdComment = Comment.fromJSONObject(jsonObject);
Response resp = Comments.performRequest(comment_body, "comment.Create");
String responseString = Objects.requireNonNull(resp.body()).string();
resp.close();
JSONObject jsonResponse = new JSONObject(responseString);
if (jsonResponse.has("result"))
createdComment = Comment.fromJSONObject(jsonResponse.getJSONObject("result"));
} catch (ApiCallException | ClassCastException | IOException | JSONException ex) {
error = ex;
}

View file

@ -14,6 +14,7 @@ import java.util.List;
import java.util.Map;
import io.lbry.browser.model.Comment;
import io.lbry.browser.utils.Comments;
import io.lbry.browser.utils.Helper;
import io.lbry.browser.utils.Lbry;
@ -21,8 +22,8 @@ public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
private final int page;
private final int pageSize;
private final String claim;
private ProgressBar progressBar;
private CommentListHandler handler;
private final ProgressBar progressBar;
private final CommentListHandler handler;
private Exception error;
public CommentListTask(int page, int pageSize, String claim, ProgressBar progressBar, CommentListHandler handler) {
@ -52,7 +53,7 @@ public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
options.put("skip_validation", true);
options.put("visible", true);
JSONObject result = (JSONObject) Lbry.genericApiCall(Lbry.METHOD_COMMENT_LIST, options);
JSONObject result = (JSONObject) Lbry.parseResponse(Comments.performRequest(Lbry.buildJsonParams(options), "comment.List"));
JSONArray items = result.getJSONArray("items");
List<Comment> children = new ArrayList<>();

View file

@ -0,0 +1,99 @@
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
package io.lbry.browser.utils;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import android.os.Build;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import org.apache.commons.codec.binary.Hex;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import org.json.JSONException;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import org.json.JSONObject;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.io.IOException;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.nio.charset.StandardCharsets;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.util.HashMap;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.util.Map;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.util.Objects;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import java.util.concurrent.TimeUnit;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import io.lbry.browser.exceptions.ApiCallException;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import okhttp3.MediaType;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import okhttp3.OkHttpClient;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import okhttp3.Request;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import okhttp3.RequestBody;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
import okhttp3.Response;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public class Comments {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public static final String COMMENT_SERVER_ENDPOINT = "https://comments.lbry.com/api/v2";
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public static JSONObject channelSign(JSONObject commentBody, String channelId, String channelName) throws ApiCallException, JSONException {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
byte[] commentBodyBytes = commentBody.getString("comment").getBytes(StandardCharsets.UTF_8);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
String encodedCommentBody;
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
encodedCommentBody = Hex.encodeHexString(commentBodyBytes, false);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
else
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
encodedCommentBody = new String(Hex.encodeHex(commentBodyBytes));
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
Map<String, Object> signingParams = new HashMap<>(3);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
signingParams.put("hexdata", encodedCommentBody);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
signingParams.put("channel_id", channelId);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
signingParams.put("channel_name", channelName);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
return (JSONObject) Lbry.genericApiCall("channel_sign", signingParams);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
/**
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* Performs request to default Comment Server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @param params JSON containing parameters to send to the server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @param method One of the available methods for comments
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @return Response from the server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @throws IOException throwable from OkHttpClient execute()
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
*/
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public static Response performRequest(JSONObject params, String method) throws IOException {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
return performRequest(COMMENT_SERVER_ENDPOINT, params, method);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
/**
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* Performs the request to Comment Server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @param commentServer Url where to direct the request
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @param params JSON containing parameters to send to the server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @param method One of the available methods for comments
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @return Response from the server
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
* @throws IOException throwable from OkHttpClient execute()
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
*/
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public static Response performRequest(String commentServer, JSONObject params, String method) throws IOException {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
final MediaType JSON = MediaType.get("application/json; charset=utf-8");
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
Map<String, Object> requestParams = new HashMap<>(4);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
requestParams.put("jsonrpc", "2.0");
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
requestParams.put("id", TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()));
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
requestParams.put("method", method);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
requestParams.put("params", params);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
RequestBody requestBody = RequestBody.create(Lbry.buildJsonParams(requestParams).toString(), JSON);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
Request commentCreateRequest = new Request.Builder()
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.url(commentServer.concat("?m=").concat(method))
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.post(requestBody)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.build();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
OkHttpClient client = new OkHttpClient.Builder().writeTimeout(30, TimeUnit.SECONDS)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.readTimeout(30, TimeUnit.SECONDS)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.build();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
return client.newCall(commentCreateRequest).execute();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
public static void checkCommentsEndpointStatus() throws IOException, JSONException, ApiCallException {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
Request request = new Request.Builder().url(STATUS_ENDPOINT).build();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
OkHttpClient client = new OkHttpClient.Builder().writeTimeout(30, TimeUnit.SECONDS)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.readTimeout(30, TimeUnit.SECONDS)
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
.build();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
Response response = client.newCall(request).execute();
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
JSONObject status = new JSONObject(Objects.requireNonNull(response.body()).string());
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
String statusText = Helper.getJSONString("text", null, status);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
boolean isRunning = Helper.getJSONBoolean("is_running", false, status);
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
if (!"ok".equalsIgnoreCase(statusText) || !isRunning) {
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
throw new ApiCallException("The comment server is not available at this time. Please try again later.");
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit
}
akinwale commented 2021-02-24 13:21:51 +01:00 (Migrated from github.com)
Review

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.

I think you can just use the current timestamp as the id here. Although we're not tracing request JSON RPC request IDs at the moment, we may want to in the future.
kekkyojin commented 2021-02-24 14:59:20 +01:00 (Migrated from github.com)
Review

Changed in the new commit

Changed in the new commit