Skip to content

Commit

Permalink
Remove redundant StanzaID code
Browse files Browse the repository at this point in the history
In relation to issues #118 and #101 a class from Openfire was duplicated in the Monitoring plugin (in commit 4065f89 ).

Now that this plugin requires a version of Openfire that has the original code, the duplicate is no longer needed. This commit replaces usage of the duplicated code with that of the original.
  • Loading branch information
guusdk committed Jan 19, 2025
1 parent b714ee9 commit 4bc3f23
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 67 deletions.
1 change: 1 addition & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h1>
<li>Requires Openfire 5.0.0</li>
<li>Note: Chat rooms can, in certain circumstances, be destroyed, and then be recreated using the same name. For data recorded by previous versions of this plugin, the plugin will associate all room history with the latest 'reincarnation' of a room. Starting with this version, new data will be associated to the correct 'incarnation' of the room.</li>
<li>Updated Chinese (zh_CN) translation</li>
<li>Remove redundant code</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/409'>Issue #409</a>] - Building Lucene index should not load all messages in memory</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/401'>Issue #401</a>] - Fixes: Update Jersey from 2.35 to 2.45</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/398'>Issue #398</a>] - Fixes: Missing translation for system property</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>Monitors conversations and statistics of the server.</description>
<author>Ignite Realtime</author>
<version>${project.version}</version>
<date>2025-01-03</date>
<date>2025-01-19</date>
<minServerVersion>5.0.0</minServerVersion>
<databaseKey>monitoring</databaseKey>
<databaseVersion>9</databaseVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.reucon.openfire.plugin.archive.PersistenceManager;
import com.reucon.openfire.plugin.archive.model.ArchivedMessage;
import com.reucon.openfire.plugin.archive.model.Conversation;
import com.reucon.openfire.plugin.archive.util.StanzaIDUtil;
import com.reucon.openfire.plugin.archive.xep0059.XmppResultSet;
import org.dom4j.Document;
import org.dom4j.DocumentException;
Expand All @@ -15,6 +14,7 @@
import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatManager;
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.stanzaid.StanzaIDUtil;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.SystemProperty;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.reucon.openfire.plugin.archive.model;

import com.reucon.openfire.plugin.archive.util.StanzaIDUtil;
import org.dom4j.*;
import org.jivesoftware.database.JiveID;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.archive.MonitoringConstants;
import org.jivesoftware.openfire.stanzaid.StanzaIDUtil;
import org.jivesoftware.util.SystemProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
62 changes: 0 additions & 62 deletions src/java/com/reucon/openfire/plugin/archive/util/StanzaIDUtil.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.jivesoftware.openfire.archive;

import com.reucon.openfire.plugin.archive.util.StanzaIDUtil;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
Expand All @@ -34,6 +33,7 @@
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.plugin.MonitoringPlugin;
import org.jivesoftware.openfire.reporting.util.TaskEngine;
import org.jivesoftware.openfire.stanzaid.StanzaIDUtil;
import org.jivesoftware.openfire.stats.Statistic;
import org.jivesoftware.openfire.stats.StatisticsManager;
import org.jivesoftware.util.*;
Expand Down Expand Up @@ -928,7 +928,7 @@ private void removeConversation(String key, Conversation conversation, Date date
* database, and associated data from the Lucene indices.
*
* @param roomID the numeric ID for the room
* @param roomJID the JID of the room
* @param roomJid the JID of the room
*/
public void clearChatHistory(final long roomID, final JID roomJid)
{
Expand Down

0 comments on commit 4bc3f23

Please sign in to comment.