Skip to content

Commit

Permalink
fixes #22: Compatibility with Openfire 4.9.0 and later
Browse files Browse the repository at this point in the history
In Openfire 4.9.0, a deprecated API was removed that was used by this plugin. This commit replaces that usage with usage of an API that was introduced in Openfire 4.8.0. As a result, this plugin now requires Openfire 4.8.0 or later.

As the plugin no longer is compatible with older versions of Openfire, a backwards-compatibily hack for JSP compilation was removed.
  • Loading branch information
guusdk committed Nov 14, 2024
1 parent 7fee14e commit 038556b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 44 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ <h1>MotD Plugin Changelog</h1>

<p><b>1.2.5</b> -- To Be Determined</p>
<ul>
<li>Requires Openfire 4.8.0 or later.</li>
<li>[<a href='https://github.com/igniterealtime/openfire-motd-plugin/issues/22'>Issue #22</a>] - Users cannot connect when enabled in Openfire 4.9.0 or later</li>
</ul>

<p><b>1.2.4</b> -- November 21, 2023</p>
<ul>
<li>Added Frenc (fr) translations provided by Vincent Vauchey</li>
<li>Added French (fr) translations provided by Vincent Vauchey</li>
<li>Added Portuguese (pt_PT) translations</li>
</ul>

Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<description>Allows admins to have a message sent to users each time they log in.</description>
<author>Ryan Graham</author>
<version>${project.version}</version>
<date>2022-11-21</date>
<minServerVersion>4.0.0</minServerVersion>
<date>2024-11-14</date>
<minServerVersion>4.8.0</minServerVersion>
<minJavaVersion>1.8</minJavaVersion>

<adminconsole>
Expand Down
11 changes: 1 addition & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.3.0</version>
<version>4.8.0</version>
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>motd</artifactId>
Expand Down Expand Up @@ -48,15 +48,6 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<!-- Use the old version for Openfire 4.2 compatibility -->
<version>9.2.14.v20151106</version>
<dependencies>
<dependency>
<groupId>org.igniterealtime.openfire</groupId>
<artifactId>xmppserver</artifactId>
<version>${openfire.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
30 changes: 0 additions & 30 deletions src/java/org/apache/jasper/runtime/JspSourceImports.java

This file was deleted.

3 changes: 2 additions & 1 deletion src/java/org/jivesoftware/openfire/plugin/MotDPlugin.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jivesoftware.openfire.plugin;

import java.io.File;
import java.time.Duration;
import java.util.TimerTask;

import org.jivesoftware.util.JiveGlobals;
Expand Down Expand Up @@ -85,7 +86,7 @@ public void run() {
}
};

TaskEngine.getInstance().schedule(messageTask, 5000);
TaskEngine.getInstance().schedule(messageTask, Duration.ofSeconds(5));
}
}

Expand Down

0 comments on commit 038556b

Please sign in to comment.