Skip to content

Commit

Permalink
fixes #5: Stop using removed API
Browse files Browse the repository at this point in the history
In recent versions of Openfire, old API was dropped. This commit replaces this with an API that was introduced in Openfire 4.6.0.
  • Loading branch information
guusdk committed Nov 20, 2024
1 parent 9f27d54 commit 5f3167e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ <h1>
Just married Plugin Changelog
</h1>

<p><b>1.2.5</b> -- (TBD)</p>
<p><b>1.3.0</b> -- (TBD)</p>
<ul>
<li>Minimum server requirement: 4.6.0</li>
<li>[<a href='https://github.com/igniterealtime/openfire-justmarried-plugin/issues/5'>#5</a>] - Fix Compatibility with Openfire 4.6.0 and later.</li>
</ul>

<p><b>1.2.4</b> -- November 11, 2020</p>
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<description>Allows admins to rename or copy users</description>
<author>Holger Bergunde</author>
<version>${project.version}</version>
<date>2020-11-11</date>
<minServerVersion>4.0.0</minServerVersion>
<date>2024-11-20</date>
<minServerVersion>4.6.0</minServerVersion>

<adminconsole>
<tab id="tab-users">
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.3.0-beta</version>
<version>4.6.0</version>
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>justmarried</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<name>JustMarried Plugin</name>
<description>Allows admins to rename or copy users</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static void addNewUserToOthersRoster(User newUser, RosterItem otherItem,

// Is this user registered with our OF server?
String username = otherItem.getJid().getNode();
if (username != null && username.length() > 0 && userManager.isRegisteredUser(username)
if (username != null && username.length() > 0 && userManager.isRegisteredUser(otherItem.getJid(), false)
&& XMPPServer.getInstance().isLocal(XMPPServer.getInstance().createJID(currentUser, null))) {
try {
User otherUser = userManager.getUser(username);
Expand Down

0 comments on commit 5f3167e

Please sign in to comment.