Commit 37a1c4fe authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1336: Update plugins to match new API.

These changes should be backwards compatible.
parent 39e33fe1
...@@ -44,6 +44,12 @@ ...@@ -44,6 +44,12 @@
Just married Plugin Changelog Just married Plugin Changelog
</h1> </h1>
<p><b>1.2.1</b> -- May 31, 2017</p>
<ul>
<li>Updated to match new API in Openfire 4.2.0</li>
<li>Slight optimization for copying the user properties.</li>
</ul>
<p><b>1.2.0</b> -- October 12, 2015</p> <p><b>1.2.0</b> -- October 12, 2015</p>
<ul> <ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li> <li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<name>Just married</name> <name>Just married</name>
<description>Allows admins to rename or copy users</description> <description>Allows admins to rename or copy users</description>
<author>Holger Bergunde</author> <author>Holger Bergunde</author>
<version>1.2.0</version> <version>1.2.1</version>
<date>10/12/2015</date> <date>05/31/2017</date>
<minServerVersion>4.0.0</minServerVersion> <minServerVersion>4.0.0</minServerVersion>
<adminconsole> <adminconsole>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</parent> </parent>
<groupId>org.igniterealtime.openfire.plugins</groupId> <groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>justmarried</artifactId> <artifactId>justmarried</artifactId>
<version>1.2.0</version> <version>1.2.1</version>
<name>JustMarried Plugin</name> <name>JustMarried Plugin</name>
<description>Allows admins to rename or copy users</description> <description>Allows admins to rename or copy users</description>
......
...@@ -98,9 +98,7 @@ public class JustMarriedPlugin implements Plugin { ...@@ -98,9 +98,7 @@ public class JustMarriedPlugin implements Plugin {
} }
private static void copyProperties(User currentUser, User newUser) { private static void copyProperties(User currentUser, User newUser) {
for (String key : currentUser.getProperties().keySet()) { newUser.getProperties().putAll( currentUser.getProperties() );
newUser.getProperties().put(key, User.getPropertyValue(currentUser.getUsername(), key));
}
} }
private static void copyRoster(User currentUser, User newUser, String currentUserName) { private static void copyRoster(User currentUser, User newUser, String currentUserName) {
......
...@@ -44,6 +44,12 @@ ...@@ -44,6 +44,12 @@
REST API Plugin Changelog REST API Plugin Changelog
</h1> </h1>
<p><b>1.2.6</b> -- May 31, 2017</p>
<ul>
<li>Updated to match new API in Openfire 4.2.0</li>
<li>Slight optimization for copying the user properties.</li>
</ul>
<p><b>1.2.5</b> -- October 14th, 2016</p> <p><b>1.2.5</b> -- October 14th, 2016</p>
<ul> <ul>
<li>Updated to match new API in Openfire 4.1.0</li> <li>Updated to match new API in Openfire 4.1.0</li>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<name>REST API</name> <name>REST API</name>
<description>Allows administration over a RESTful API.</description> <description>Allows administration over a RESTful API.</description>
<author>Roman Soldatow</author> <author>Roman Soldatow</author>
<version>1.2.5</version> <version>1.2.6</version>
<date>10/14/2016</date> <date>05/31/2017</date>
<minServerVersion>4.1.0</minServerVersion> <minServerVersion>4.1.0</minServerVersion>
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
</parent> </parent>
<groupId>org.igniterealtime.openfire.plugins</groupId> <groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>restAPI</artifactId> <artifactId>restAPI</artifactId>
<version>1.2.6</version>
<name>Rest API Plugin</name> <name>Rest API Plugin</name>
<description>Allows administration over a RESTful API.</description>
<build> <build>
<sourceDirectory>src/java</sourceDirectory> <sourceDirectory>src/java</sourceDirectory>
......
...@@ -148,9 +148,7 @@ public class JustMarriedController { ...@@ -148,9 +148,7 @@ public class JustMarriedController {
* the new user * the new user
*/ */
private static void copyProperties(User currentUser, User newUser) { private static void copyProperties(User currentUser, User newUser) {
for (String key : currentUser.getProperties().keySet()) { newUser.getProperties().putAll( currentUser.getProperties() );
newUser.getProperties().put(key, User.getPropertyValue(currentUser.getUsername(), key));
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment