diff --git a/changelog.html b/changelog.html
index f4b8413..c02835f 100644
--- a/changelog.html
+++ b/changelog.html
@@ -43,6 +43,12 @@
LLaMA Plugin Changelog
+0.2.0 -- November 18, 2024
+
+
+ - Made compatible with Openfire 5.0.0
+
+
0.1.0 -- October 8, 2024
diff --git a/plugin.xml b/plugin.xml
index c3be67b..e020522 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -6,8 +6,8 @@
${project.description}
${project.version}
Apache 2.0
- 2023-12-31
- 4.8.0
+ 2024-11-18
+ 5.0.0
diff --git a/pom.xml b/pom.xml
index 387613f..f81f817 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
plugins
org.igniterealtime.openfire
- 4.9.0
+ 5.0.0-SNAPSHOT
org.igniterealtime.openfire
@@ -66,8 +66,8 @@
maven-assembly-plugin
- org.eclipse.jetty
- jetty-jspc-maven-plugin
+ org.eclipse.jetty.ee8
+ jetty-ee8-jspc-maven-plugin
diff --git a/src/java/org/ifsoft/llama/openfire/LLaMA.java b/src/java/org/ifsoft/llama/openfire/LLaMA.java
index bec559a..5b15bb5 100644
--- a/src/java/org/ifsoft/llama/openfire/LLaMA.java
+++ b/src/java/org/ifsoft/llama/openfire/LLaMA.java
@@ -45,6 +45,7 @@
import org.jivesoftware.util.PropertyEventListener;
import org.jivesoftware.util.StringUtils;
+/*
import org.eclipse.jetty.apache.jsp.JettyJasperInitializer;
import org.eclipse.jetty.plus.annotation.ContainerInitializer;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
@@ -63,6 +64,9 @@
import org.eclipse.jetty.util.security.*;
import org.eclipse.jetty.security.*;
import org.eclipse.jetty.security.authentication.*;
+*/
+
+import org.eclipse.jetty.ee8.webapp.WebAppContext;
import java.lang.reflect.*;
import java.util.*;
@@ -206,11 +210,13 @@ private void startJSP(File pluginDirectory) {
jspService.setClassLoader(this.getClass().getClassLoader());
jspService.getMimeTypes().addMimeMapping("wasm", "application/wasm");
+ /*
final List initializers = new ArrayList<>();
initializers.add(new ContainerInitializer(new JettyJasperInitializer(), null));
jspService.setAttribute("org.eclipse.jetty.containerInitializers", initializers);
jspService.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
-
+ */
+
Log.info("LLaMA jsp service enabled");
HttpBindManager.getInstance().addJettyHandler(jspService);
}
@@ -426,10 +432,10 @@ public void messageReceived(JID roomJID, JID user, String nickname, Message mess
final MUCRoom mucRoom = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService("conference").getChatRoom(room);
boolean isOccupant = false;
- for (MUCRole role : mucRoom.getOccupants()) {
- Log.info("matching room occupant " + role.getUserAddress() + " with " + llamaUser );
+ for (MUCOccupant occupant : mucRoom.getOccupants()) {
+ Log.info("matching room occupant " + occupant.getUserAddress() + " with " + llamaUser );
- if (role.getUserAddress().getNode().equals(llamaUser)) {
+ if (occupant.getUserAddress().getNode().equals(llamaUser)) {
isOccupant = true;
break;
}