From 782448b3ec668c4b10d4d1626d05d7beb4924793 Mon Sep 17 00:00:00 2001 From: rcollier Date: Fri, 31 Jan 2014 03:52:13 +0000 Subject: [PATCH] SMACK-403 New constructor added with no DelayInfo. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_4_0@13884 b35dd754-fafc-0310-a699-88a17e54d16e --- .../org/jivesoftware/smackx/forward/Forwarded.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/org/jivesoftware/smackx/forward/Forwarded.java b/source/org/jivesoftware/smackx/forward/Forwarded.java index eecd819fa..16ab403b7 100644 --- a/source/org/jivesoftware/smackx/forward/Forwarded.java +++ b/source/org/jivesoftware/smackx/forward/Forwarded.java @@ -18,11 +18,7 @@ package org.jivesoftware.smackx.forward; import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.packet.PacketExtension; -import org.jivesoftware.smack.provider.PacketExtensionProvider; -import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smackx.packet.DelayInfo; -import org.jivesoftware.smackx.provider.DelayInfoProvider; -import org.xmlpull.v1.XmlPullParser; /** * Packet extension for XEP-0297: Stanza Forwarding. @@ -47,6 +43,16 @@ public class Forwarded implements PacketExtension { this.forwardedPacket = fwdPacket; } + /** + * Creates a new Forwarded packet extension. + * + * @param delay an optional {@link DelayInfo} timestamp of the packet. + * @param fwdPacket the packet that is forwarded (required). + */ + public Forwarded(Packet fwdPacket) { + this.forwardedPacket = fwdPacket; + } + @Override public String getElementName() { return ELEMENT_NAME;