Examples of findOccupantByJID()


Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

        if (room.isInRoom(newOccupantJid)) {
            // user is already in room, change nick
            logger.debug("{} has requested to change nick in room {}", newOccupantJid, roomJid);

            // occupant is already in room
            Occupant occupant = room.findOccupantByJID(newOccupantJid);
            if (nick.equals(occupant.getNick())) {
                // nick unchanged, change show and status
                for (Occupant receiver : room.getOccupants()) {
                    sendChangeShowStatus(occupant, receiver, room, getInnerElementText(stanza, "show"),
                            getInnerElementText(stanza, "status"), serverRuntimeContext);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

            ServerRuntimeContext serverRuntimeContext) {
        Room room = conference.findRoom(roomJid);

        // room must exist, or we do nothing
        if (room != null) {
            Occupant exitingOccupant = room.findOccupantByJID(occupantJid);

            // user must by in room, or we do nothing
            if (exitingOccupant != null) {
                Collection<Occupant> allOccupants = room.getOccupants();
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

            }

            logger.debug("Received groupchat message to {}", roomJid);
            Room room = conference.findRoom(roomJid);
            if (room != null) {
                Occupant sendingOccupant = room.findOccupantByJID(from);

                // sender must be participant in room
                if (sendingOccupant != null) {

                    Entity roomAndSendingNick = new EntityImpl(room.getJID(), sendingOccupant.getNick());
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

        } else if (type == null || type == MessageStanzaType.CHAT || type == MessageStanzaType.NORMAL) {
            // private message
            logger.debug("Received direct message to {}", roomWithNickJid);
            Room room = conference.findRoom(roomJid);
            if (room != null) {
                Occupant sendingOccupant = room.findOccupantByJID(from);

                // sender must be participant in room
                if(roomWithNickJid.equals(roomJid)) {
                    // check x element
                   
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

    protected Stanza handleSet(IQStanza stanza, ServerRuntimeContext serverRuntimeContext, SessionContext sessionContext) {
        logger.debug("Received MUC admin stanza");
       
        Room room = conference.findRoom(stanza.getTo());

        Occupant moderator = room.findOccupantByJID(stanza.getFrom());

        // check if moderator
        if (moderator == null || moderator.getRole() != Role.Moderator) {
            // only moderators are allowed to continue
            logger.debug("Only moderators are allowed to issue admin stanzas");
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByJID()

        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "nick 2");

        changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID, "new nick"));

        Occupant occupant = room.findOccupantByJID(OCCUPANT1_JID);
        assertEquals("new nick", occupant.getNick());

        MucUserItem unavailbleItem = new MucUserItem(OCCUPANT1_JID, "new nick", Affiliation.None,
                Role.Participant);
        assertPresenceStanza(new EntityImpl(ROOM1_JID, "nick"), OCCUPANT1_JID, PresenceStanzaType.UNAVAILABLE, Arrays.asList(unavailbleItem),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.