mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-01 05:02:21 -05:00
Allow JIDs such as "example.net/@"
This commit is contained in:
parent
4f9dd82457
commit
29a7828c5f
@ -70,8 +70,7 @@ public final class Jid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Go ahead and check if the localpart or resourcepart is empty.
|
// Go ahead and check if the localpart or resourcepart is empty.
|
||||||
if (jid.startsWith("@") || jid.endsWith("@") ||
|
if (jid.startsWith("@") || (jid.endsWith("@") && slashCount == 0) || jid.startsWith("/") || (jid.endsWith("/") && slashCount < 2)) {
|
||||||
jid.startsWith("/") || jid.endsWith("/")) {
|
|
||||||
throw new InvalidJidException(InvalidJidException.INVALID_CHARACTER);
|
throw new InvalidJidException(InvalidJidException.INVALID_CHARACTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user