Commit 81a286a2 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Do not store messages of type groupchat, error or headline. JM-467

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3114 b35dd754-fafc-0310-a699-88a17e54d16e
parent 47e718d2
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
package org.jivesoftware.messenger; package org.jivesoftware.messenger;
import org.jivesoftware.messenger.container.BasicModule; import org.jivesoftware.messenger.container.BasicModule;
import org.jivesoftware.messenger.muc.MultiUserChatServer;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
...@@ -32,7 +31,6 @@ public class OfflineMessageStrategy extends BasicModule { ...@@ -32,7 +31,6 @@ public class OfflineMessageStrategy extends BasicModule {
private OfflineMessageStore messageStore; private OfflineMessageStore messageStore;
private JID serverAddress; private JID serverAddress;
private PacketRouter router; private PacketRouter router;
private String mucServiceDomain;
public OfflineMessageStrategy() { public OfflineMessageStrategy() {
super("Offline Message Strategy"); super("Offline Message Strategy");
...@@ -67,10 +65,10 @@ public class OfflineMessageStrategy extends BasicModule { ...@@ -67,10 +65,10 @@ public class OfflineMessageStrategy extends BasicModule {
recipientJID.getNode() == null) { recipientJID.getNode() == null) {
return; return;
} }
// Ignore packets sent from the MUC service // Do not store messages of type groupchat, error or headline as specified in JEP-160
// TODO Remove this code when JEP-79 is implemented and MUC packets include the drop action if (Message.Type.groupchat == message.getType() ||
JID senderJID = message.getFrom(); Message.Type.error == message.getType() ||
if (senderJID != null && mucServiceDomain.equals(senderJID.getDomain())) { Message.Type.headline == message.getType()) {
return; return;
} }
...@@ -128,7 +126,6 @@ public class OfflineMessageStrategy extends BasicModule { ...@@ -128,7 +126,6 @@ public class OfflineMessageStrategy extends BasicModule {
super.initialize(server); super.initialize(server);
messageStore = server.getOfflineMessageStore(); messageStore = server.getOfflineMessageStore();
router = server.getPacketRouter(); router = server.getPacketRouter();
mucServiceDomain = server.getMultiUserChatServer().getServiceDomain();
serverAddress = new JID(server.getServerInfo().getName()); serverAddress = new JID(server.getServerInfo().getName());
String quota = JiveGlobals.getProperty("xmpp.offline.quota"); String quota = JiveGlobals.getProperty("xmpp.offline.quota");
......
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