From 0d17f195b013916912c6a4fd4b2fe16c211eb46e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 7 Apr 2019 22:13:38 +0200 Subject: [PATCH] Use EntityFullJid as JID type in MultiUserChat.getJoinedRooms() Got a user who put in a EntityBareJid and wondered why the returned list was empty. --- .../org/jivesoftware/smackx/muc/MultiUserChatManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java index 639e2f792..c5225f062 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2014-2018 Florian Schmaus + * Copyright © 2014-2019 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,6 +59,7 @@ import org.jivesoftware.smackx.muc.packet.MUCUser; import org.jxmpp.jid.DomainBareJid; import org.jxmpp.jid.EntityBareJid; +import org.jxmpp.jid.EntityFullJid; import org.jxmpp.jid.EntityJid; import org.jxmpp.jid.Jid; import org.jxmpp.jid.parts.Resourcepart; @@ -304,7 +305,7 @@ public final class MultiUserChatManager extends Manager { * @throws NotConnectedException * @throws InterruptedException */ - public List getJoinedRooms(EntityJid user) throws NoResponseException, XMPPErrorException, + public List getJoinedRooms(EntityFullJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Send the disco packet to the user DiscoverItems result = serviceDiscoveryManager.discoverItems(user, DISCO_NODE);