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 @@
Just married Plugin Changelog
</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>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li>
......
......@@ -5,8 +5,8 @@
<name>Just married</name>
<description>Allows admins to rename or copy users</description>
<author>Holger Bergunde</author>
<version>1.2.0</version>
<date>10/12/2015</date>
<version>1.2.1</version>
<date>05/31/2017</date>
<minServerVersion>4.0.0</minServerVersion>
<adminconsole>
......
......@@ -8,7 +8,7 @@
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>justmarried</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<name>JustMarried Plugin</name>
<description>Allows admins to rename or copy users</description>
......
......@@ -98,9 +98,7 @@ public class JustMarriedPlugin implements Plugin {
}
private static void copyProperties(User currentUser, User newUser) {
for (String key : currentUser.getProperties().keySet()) {
newUser.getProperties().put(key, User.getPropertyValue(currentUser.getUsername(), key));
}
newUser.getProperties().putAll( currentUser.getProperties() );
}
private static void copyRoster(User currentUser, User newUser, String currentUserName) {
......
......@@ -44,6 +44,12 @@
REST API Plugin Changelog
</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>
<ul>
<li>Updated to match new API in Openfire 4.1.0</li>
......
......@@ -5,8 +5,8 @@
<name>REST API</name>
<description>Allows administration over a RESTful API.</description>
<author>Roman Soldatow</author>
<version>1.2.5</version>
<date>10/14/2016</date>
<version>1.2.6</version>
<date>05/31/2017</date>
<minServerVersion>4.1.0</minServerVersion>
<adminconsole>
<tab id="tab-server">
......
......@@ -8,7 +8,9 @@
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>restAPI</artifactId>
<version>1.2.6</version>
<name>Rest API Plugin</name>
<description>Allows administration over a RESTful API.</description>
<build>
<sourceDirectory>src/java</sourceDirectory>
......
......@@ -148,9 +148,7 @@ public class JustMarriedController {
* the new user
*/
private static void copyProperties(User currentUser, User newUser) {
for (String key : currentUser.getProperties().keySet()) {
newUser.getProperties().put(key, User.getPropertyValue(currentUser.getUsername(), key));
}
newUser.getProperties().putAll( currentUser.getProperties() );
}
/**
......
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