diff --git a/changelog.html b/changelog.html
index abac419..45cffcc 100644
--- a/changelog.html
+++ b/changelog.html
@@ -46,6 +46,7 @@
0.0.2 -- December 31, 2023
+ - Fix bug with groupchat messages
- Upgraded to latest llama binaries
- Add vcard-temp support for LLaMA user
diff --git a/src/java/org/ifsoft/llama/openfire/LLaMA.java b/src/java/org/ifsoft/llama/openfire/LLaMA.java
index efd2633..3d3d5df 100644
--- a/src/java/org/ifsoft/llama/openfire/LLaMA.java
+++ b/src/java/org/ifsoft/llama/openfire/LLaMA.java
@@ -447,7 +447,7 @@ public void messageReceived(JID roomJID, JID user, String nickname, Message mess
Thread.sleep(1000);
}
- llamaConnection.handlePrediction(body, roomJID, message.getType());
+ //llamaConnection.handlePrediction(body, roomJID, message.getType());
}
} catch (Exception e) {
Log.error("unable to handle groupchat message", e);
diff --git a/src/java/org/ifsoft/llama/openfire/LLaMAConnection.java b/src/java/org/ifsoft/llama/openfire/LLaMAConnection.java
index 91116af..db0e1f3 100644
--- a/src/java/org/ifsoft/llama/openfire/LLaMAConnection.java
+++ b/src/java/org/ifsoft/llama/openfire/LLaMAConnection.java
@@ -261,7 +261,19 @@ public void deliver(Packet packet) throws UnauthorizedException {
if (!isNull(msg) && !isNull(from) /*&& SessionManager.getInstance().getSessions(from).size() > 0*/)
{
- handlePrediction(msg, packet.getFrom(), message.getType());
+ JID requestor = packet.getFrom();
+
+ if (message.getType() == Message.Type.groupchat) {
+ final String llamaUser = JiveGlobals.getProperty("llama.username", "llama");
+
+ if (msg.toLowerCase().startsWith(llamaUser.toLowerCase())) {
+ requestor = new JID(packet.getFrom().toBareJID());
+ handlePrediction(msg, requestor, message.getType());
+ }
+
+ } else {
+ handlePrediction(msg, requestor, message.getType());
+ }
}
}
}