diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/JidHelper.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/JidHelper.java b/src/main/java/de/pixart/messenger/utils/JidHelper.java index 6b0dc0122..830dd817c 100644 --- a/src/main/java/de/pixart/messenger/utils/JidHelper.java +++ b/src/main/java/de/pixart/messenger/utils/JidHelper.java @@ -39,12 +39,12 @@ import rocks.xmpp.addr.Jid; public class JidHelper { - private static List<String> LOCALPART_BLACKLIST = Arrays.asList("xmpp", "jabber", "me"); + private static List<String> LOCAL_PART_BLACKLIST = Arrays.asList("xmpp", "jabber", "me"); public static String localPartOrFallback(Jid jid) { - if (LOCALPART_BLACKLIST.contains(jid.getLocal().toLowerCase(Locale.ENGLISH))) { + if (LOCAL_PART_BLACKLIST.contains(jid.getLocal().toLowerCase(Locale.ENGLISH))) { final String domain = jid.getDomain(); - final int index = domain.lastIndexOf('.'); + final int index = domain.indexOf('.'); return index > 1 ? domain.substring(0, index) : domain; } else { return jid.getLocal(); @@ -58,4 +58,5 @@ public class JidHelper { return InvalidJid.of(jid, true); } } + }
\ No newline at end of file |