From 94c8b9ed04eec0c44d994d7c2a195e4702abe0fe Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 13 Feb 2023 19:06:48 +0100 Subject: [PATCH] add models for retraction --- .../java/eu/siacs/conversations/xml/Namespace.java | 1 + .../conversations/android/database/model/PartType.java | 4 +++- .../android/xmpp/model/retract/Retract.java | 10 ++++++++++ .../android/xmpp/model/retract/Retracted.java | 10 ++++++++++ .../android/xmpp/model/retract/package-info.java | 5 +++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/main/java/im/conversations/android/xmpp/model/retract/Retract.java create mode 100644 src/main/java/im/conversations/android/xmpp/model/retract/Retracted.java create mode 100644 src/main/java/im/conversations/android/xmpp/model/retract/package-info.java diff --git a/src/main/java/eu/siacs/conversations/xml/Namespace.java b/src/main/java/eu/siacs/conversations/xml/Namespace.java index 8493e5b3e..82f94d77f 100644 --- a/src/main/java/eu/siacs/conversations/xml/Namespace.java +++ b/src/main/java/eu/siacs/conversations/xml/Namespace.java @@ -91,6 +91,7 @@ public final class Namespace { public static final String REGISTER = "jabber:iq:register"; public static final String REGISTER_STREAM_FEATURE = "http://jabber.org/features/iq-register"; public static final String REPLY = "urn:xmpp:reply:0"; + public static final String RETRACT = "urn:xmpp:message-retract:0"; public static final String ROSTER = "jabber:iq:roster"; public static final String SASL = "urn:ietf:params:xml:ns:xmpp-sasl"; public static final String SASL_2 = "urn:xmpp:sasl:2"; diff --git a/src/main/java/im/conversations/android/database/model/PartType.java b/src/main/java/im/conversations/android/database/model/PartType.java index 2f4f11d68..c36e8692d 100644 --- a/src/main/java/im/conversations/android/database/model/PartType.java +++ b/src/main/java/im/conversations/android/database/model/PartType.java @@ -2,5 +2,7 @@ package im.conversations.android.database.model; public enum PartType { TEXT, - FILE + FILE, + RETRACTION, + MODERATION } diff --git a/src/main/java/im/conversations/android/xmpp/model/retract/Retract.java b/src/main/java/im/conversations/android/xmpp/model/retract/Retract.java new file mode 100644 index 000000000..8e7daf24a --- /dev/null +++ b/src/main/java/im/conversations/android/xmpp/model/retract/Retract.java @@ -0,0 +1,10 @@ +package im.conversations.android.xmpp.model.retract; + +import im.conversations.android.xmpp.model.Extension; + +public class Retract extends Extension { + + public Retract() { + super(Retract.class); + } +} diff --git a/src/main/java/im/conversations/android/xmpp/model/retract/Retracted.java b/src/main/java/im/conversations/android/xmpp/model/retract/Retracted.java new file mode 100644 index 000000000..1df163f7b --- /dev/null +++ b/src/main/java/im/conversations/android/xmpp/model/retract/Retracted.java @@ -0,0 +1,10 @@ +package im.conversations.android.xmpp.model.retract; + +import im.conversations.android.xmpp.model.Extension; + +public class Retracted extends Extension { + + public Retracted() { + super(Retracted.class); + } +} diff --git a/src/main/java/im/conversations/android/xmpp/model/retract/package-info.java b/src/main/java/im/conversations/android/xmpp/model/retract/package-info.java new file mode 100644 index 000000000..e370440ba --- /dev/null +++ b/src/main/java/im/conversations/android/xmpp/model/retract/package-info.java @@ -0,0 +1,5 @@ +@XmlPackage(namespace = Namespace.RETRACT) +package im.conversations.android.xmpp.model.retract; + +import eu.siacs.conversations.xml.Namespace; +import im.conversations.android.annotation.XmlPackage;