From 2ab11711401caefe522e7d2ab69313bc353fefdd Mon Sep 17 00:00:00 2001 From: deepak Date: Mon, 19 Oct 2020 15:10:38 +0530 Subject: [PATCH 1/2] - fixed bug to revoke self role from conference. --- .../java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java b/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java index e7e97e5f5e..66f55ae0eb 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java @@ -98,6 +98,8 @@ public void handleIQ(IQ packet, MUCRole role) throws ForbiddenException, Conflic if (!itemsList.isEmpty()) { handleItemsElement(role, itemsList, reply); + } else if (!itemsList.isEmpty() && !itemsList.toString().contains(packet.getFrom().toBareJID())) { + handleItemsElement(role, itemsList, reply); } else { // An unknown and possibly incorrect element was included in the query From 7dbd293e85c892a864b29928cf3006b525eaa1a2 Mon Sep 17 00:00:00 2001 From: deepak Date: Fri, 6 Nov 2020 13:32:57 +0530 Subject: [PATCH 2/2] - fixed bug to revoke own role from conference. --- .../openfire/muc/spi/IQAdminHandler.java | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java b/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java index 66f55ae0eb..5ac74020bc 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQAdminHandler.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.openfire.muc.spi; import java.util.ArrayList; @@ -40,15 +39,16 @@ import org.xmpp.packet.Presence; /** - * A handler for the IQ packet with namespace http://jabber.org/protocol/muc#admin. This kind of - * packets are usually sent by room admins. So this handler provides the necessary functionality - * to support administrator requirements such as: managing room members/outcasts/etc., kicking - * occupants and banning users. + * A handler for the IQ packet with namespace + * http://jabber.org/protocol/muc#admin. This kind of packets are usually sent + * by room admins. So this handler provides the necessary functionality to + * support administrator requirements such as: managing room + * members/outcasts/etc., kicking occupants and banning users. * * @author Gaston Dombiak */ public class IQAdminHandler { - + private static final Logger logger = LoggerFactory.getLogger(IQAdminHandler.class); private final LocalMUCRoom room; @@ -64,7 +64,8 @@ public IQAdminHandler(LocalMUCRoom chatroom, PacketRouter packetRouter) { } /** - * Handles the IQ packet sent by an owner or admin of the room. Possible actions are: + * Handles the IQ packet sent by an owner or admin of the room. Possible + * actions are: *