Skip to content

Commit

Permalink
fix bug with IQ prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Oct 22, 2024
1 parent 9fa3cb0 commit f36d14e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/java/org/ifsoft/llama/openfire/LLaMAConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,13 @@ private String getJson(String urlToRead, JSONObject data, JID requestor, Message
Log.info("getJson - chat\n" + msg);
result = new StringBuilder();

if (requestor != null && !isNull(msg)) {
replyChat(msg, requestor, chatType);
if (!isNull(msg)) {
accumulator = accumulator + msg;
}

if (requestor != null && !isNull(msg)) {
replyChat(msg, requestor, chatType);
}
}

} else {

Expand All @@ -423,11 +426,14 @@ private String getJson(String urlToRead, JSONObject data, JID requestor, Message
}
} else { // end of text stream
String msg = result.toString();
Log.info("getJson - chat\n" + msg);
Log.info("getJson - final chat\n" + msg);

if (requestor != null) {
replyChat(msg, requestor, chatType);
accumulator = accumulator + msg;
if (!isNull(msg)) {
accumulator = accumulator + msg;

if (requestor != null) {
replyChat(msg, requestor, chatType);
}
}
}
}
Expand Down

0 comments on commit f36d14e

Please sign in to comment.