Commit e7fa892b authored by Dave Cridland's avatar Dave Cridland

Merge pull request #544 from n00dl3/master

Fix non-working XEP-0136 for monitoring plugin
parents 6bbfd58f c4753f69
...@@ -25,12 +25,12 @@ public abstract class AbstractXepSupport { ...@@ -25,12 +25,12 @@ public abstract class AbstractXepSupport {
protected final String namespace; protected final String namespace;
protected Collection<IQHandler> iqHandlers; protected Collection<IQHandler> iqHandlers;
public AbstractXepSupport(XMPPServer server, String namespace, String iqDispatcherName) { public AbstractXepSupport(XMPPServer server, String namespace,String iqDispatcherNamespace, String iqDispatcherName) {
this.server = server; this.server = server;
this.element2Handlers = Collections this.element2Handlers = Collections
.synchronizedMap(new HashMap<String, IQHandler>()); .synchronizedMap(new HashMap<String, IQHandler>());
this.iqDispatcher = new AbstractIQHandler(iqDispatcherName, null, namespace) { this.iqDispatcher = new AbstractIQHandler(iqDispatcherName, null, iqDispatcherNamespace) {
public IQ handleIQ(IQ packet) throws UnauthorizedException { public IQ handleIQ(IQ packet) throws UnauthorizedException {
if (!MonitoringPlugin.getInstance().isEnabled()) { if (!MonitoringPlugin.getInstance().isEnabled()) {
return error(packet, return error(packet,
......
...@@ -13,10 +13,11 @@ import com.reucon.openfire.plugin.archive.xep.AbstractXepSupport; ...@@ -13,10 +13,11 @@ import com.reucon.openfire.plugin.archive.xep.AbstractXepSupport;
*/ */
public class Xep0136Support extends AbstractXepSupport { public class Xep0136Support extends AbstractXepSupport {
private static final String NAMESPACE = "urn:xmpp:archive:auto"; private static final String NAMESPACE_AUTO = "urn:xmpp:archive:auto";
private static final String IQ_NAMESPACE = "urn:xmpp:archive";
public Xep0136Support(XMPPServer server) { public Xep0136Support(XMPPServer server) {
super(server, NAMESPACE, "XEP-0136 IQ Dispatcher"); super(server, NAMESPACE_AUTO,IQ_NAMESPACE, "XEP-0136 IQ Dispatcher");
iqHandlers = new ArrayList<IQHandler>(); iqHandlers = new ArrayList<IQHandler>();
......
...@@ -16,7 +16,7 @@ public class Xep0313Support extends AbstractXepSupport { ...@@ -16,7 +16,7 @@ public class Xep0313Support extends AbstractXepSupport {
private static final String NAMESPACE = "urn:xmpp:mam:0"; private static final String NAMESPACE = "urn:xmpp:mam:0";
public Xep0313Support(XMPPServer server) { public Xep0313Support(XMPPServer server) {
super(server, NAMESPACE, "XEP-0313 IQ Dispatcher"); super(server, NAMESPACE,NAMESPACE, "XEP-0313 IQ Dispatcher");
this.iqHandlers = new ArrayList<IQHandler>(); this.iqHandlers = new ArrayList<IQHandler>();
iqHandlers.add(new IQQueryHandler()); iqHandlers.add(new IQQueryHandler());
......
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