aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/xmpp/JidConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/xmpp/JidConverter.java')
-rw-r--r--src/main/java/com/juick/server/xmpp/JidConverter.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/xmpp/JidConverter.java b/src/main/java/com/juick/server/xmpp/JidConverter.java
new file mode 100644
index 00000000..e9a9707e
--- /dev/null
+++ b/src/main/java/com/juick/server/xmpp/JidConverter.java
@@ -0,0 +1,13 @@
+package com.juick.server.xmpp;
+
+import org.springframework.core.convert.converter.Converter;
+import org.springframework.lang.Nullable;
+import rocks.xmpp.addr.Jid;
+
+public class JidConverter implements Converter<String, Jid> {
+ @Nullable
+ @Override
+ public Jid convert(String jidStr) {
+ return Jid.of(jidStr);
+ }
+}