mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Fix PubSub namespaces
Those were broken since 9e797c1b17
as they
always used the basic PubSub namespace, i.e. without a fragment. Which
resulted in e.g. delete requests look like
<iq to="pubsub.ec-xmpp" id="2GAeW-75" type="set">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<delete node="2e92d38c-9e90-47f6-8e26-330d25ebe96b"/>
</pubsub>
</iq>
when the namespace should be in fact
http://jabber.org/protocol/pubsub#owner
This commit is contained in:
parent
d0341c1d94
commit
add4ff5b5a
5 changed files with 70 additions and 69 deletions
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
@ -37,13 +38,8 @@ public class ThreadedDummyConnection extends DummyConnection {
|
|||
private volatile boolean timeout = false;
|
||||
|
||||
@Override
|
||||
public void sendPacket(Packet packet) {
|
||||
try {
|
||||
super.sendPacket(packet);
|
||||
}
|
||||
catch (NotConnectedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
public void sendPacket(Packet packet) throws NotConnectedException {
|
||||
super.sendPacket(packet);
|
||||
|
||||
if (packet instanceof IQ && !timeout) {
|
||||
timeout = false;
|
||||
|
@ -106,4 +102,10 @@ public class ThreadedDummyConnection extends DummyConnection {
|
|||
}
|
||||
}
|
||||
|
||||
public static ThreadedDummyConnection newInstance() throws SmackException, IOException, XMPPException {
|
||||
ThreadedDummyConnection threadedDummyConnection = new ThreadedDummyConnection();
|
||||
threadedDummyConnection.connect();
|
||||
return threadedDummyConnection;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue