powered by Jive Software

PEP events not processed by smack

hi,

i’ve been working with the new PEP functionality in Smack 3.1.0 but with no joy … it seems that messages generated by pep events are not picked up by smack …

I followed the instructions on the PEPManager API class description, http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/

you don’t need to publish a tune or a mood from your code … do it from a another client … and you’ll see that nothing happens …

fiddled with some packet listeners too … and it seems that not even the following code works:

PacketFilter packetFilter = new PacketExtensionFilter(“event”, “http://jabber.org/protocol/pubsub#event”);
PacketListener packetListener = new PacketListener() {
public void processPacket(Packet packet) {
Message message = (Message) packet;
//PEPEvent event = (PEPEvent) message.getExtension(“event”, “http://jabber.org/protocol/pubsub#event”);

  •            logger.debug("processPacket: event: " + message);
          }
      };*
    
  • xmppConnection.addPacketListener(packetListener, null);*

as you can see the second argument in the addPacketListener is null, so the listener should report all messages coming in … and it does as long as they are chat messages … but if they contain events … well nothing happens …

your help will appreciated …

many thanks in advance

luca

it seems that all I had to do was to add …

event http://jabber.org/protocol/pubsub#event org.jivesoftware.smackx.provider.PEPProvider

to the smack.providers file …

thanks anyway