Skip to content

Commit

Permalink
fix name and url
Browse files Browse the repository at this point in the history
  • Loading branch information
Yinnii committed Apr 24, 2024
1 parent 568c215 commit 647db17
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public Response chatAsync(String body) throws IOException, ParseException {

isActive.put(channel, true);

biwibotAsync(message, channel, sbfmUrl);
lmsbotAsync(message, channel, sbfmUrl);

ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();

Expand All @@ -198,7 +198,7 @@ public Response chatAsync(String body) throws IOException, ParseException {
return Response.ok().entity(chatResponse.toString()).build();
}

public void biwibotAsync(String sbfmUrl, String msg, String channel){
public void lmsbotAsync(String sbfmUrl, String msg, String channel){
JSONObject chatResponse = new JSONObject();
JSONObject newEvent = new JSONObject();
chatResponse.put("closeContext", false);
Expand All @@ -208,12 +208,11 @@ public void biwibotAsync(String sbfmUrl, String msg, String channel){
public void run() {
try {
System.out.println("Thread started.");
String question = msg;
newEvent.put("msg", msg);
newEvent.put("channel", channel);

// Make the POST request to localhost:5000/chat
String url = "localhost:5000";
String url = "http://localhost:5000/chat";
HttpClient httpClient = HttpClient.newHttpClient();
HttpRequest httpRequest = HttpRequest.newBuilder()
.uri(UriBuilder.fromUri(url).build())
Expand Down

0 comments on commit 647db17

Please sign in to comment.