Skip to content

Commit

Permalink
Fixes compatibility issue with Openfire 4.9.0
Browse files Browse the repository at this point in the history
This replaces API of Openfire that was removed in Openfire 4.9.0. The plugin remains compatible with Openfire 4.8.0 and later.

Fixes igniterealtime#200
  • Loading branch information
guusdk committed Oct 4, 2024
1 parent b600767 commit 7b45080
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ <h1>
REST API Plugin Changelog
</h1>

<p><b>1.11.1</b> (tbd)</p>
<ul>
<li>[<a href='https://github.com/igniterealtime/openfire-restAPI-plugin/issues/200'>#200</a>] - Fix compatibility issue with Openfire 4.9.0.</li>
</ul>

<p><b>1.11.0</b> June 25, 2024</p>
<ul>
<li>Now requires Openfire 4.8.0 or later</li>
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>Allows administration over a RESTful API.</description>
<author>Roman Soldatow</author>
<version>${project.version}</version>
<date>2024-06-25</date>
<date>2024-10-04</date>
<minServerVersion>4.8.0</minServerVersion>
<adminconsole>
<tab id="tab-server">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022.
* Copyright (c) 2022-2024 Ignite Realtime Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -130,14 +130,14 @@ private SessionEntities convertToSessionEntities(Collection<ClientSession> clien
}

String status = "";
if (clientSession.getStatus() == Session.STATUS_CLOSED) {
if (clientSession.getStatus() == Session.Status.CLOSED) {
status = "Closed";
} else if (clientSession.getStatus() == Session.STATUS_CONNECTED) {
} else if (clientSession.getStatus() == Session.Status.CONNECTED) {
status = "Connected";
} else if (clientSession.getStatus() == Session.STATUS_AUTHENTICATED) {
} else if (clientSession.getStatus() == Session.Status.AUTHENTICATED) {
status = "Authenticated";
} else {
status = "Unkown";
status = "Unknown";
}
session.setSessionStatus(status);

Expand Down Expand Up @@ -170,7 +170,7 @@ private SessionEntities convertToSessionEntities(Collection<ClientSession> clien

session.setCreationDate(clientSession.getCreationDate());
session.setLastActionDate(clientSession.getLastActiveDate());
session.setSecure(clientSession.isSecure());
session.setSecure(clientSession.isEncrypted());

sessions.add(session);
}
Expand Down

0 comments on commit 7b45080

Please sign in to comment.