powered by Jive Software

Jabber: x :expires for message expiration

Greetings. I need to insert an expire time (e.g. <x xmlns=“jabber : x : expires” seconds=’‘60’’ /> ) into packets I send. DefaultPacketExtension.addExtension() doesn’‘t seem to support attributes (does it??), so while I could use that for the namespace, I can’‘t put the “seconds” attribute thre. I also couldn’'t find any other methods (e.g. on packet, message, etc.) to set an expiration time for the whole thing. Any good ideas on how to do this? Am I missing something simple?



Message was edited by: knauer


Yes, DefaultPacketExtension doesn’‘t support attributes. I’'d recommend making your own packet extension class, maybe called Expiration that implements PacketExtension. You can then add it to the message.