Search in sources :

Example 1 with OTRSession

use of org.jivesoftware.spark.otrplug.impl.OTRSession in project Spark by igniterealtime.

the class OTRManager method chatRoomClosed.

@Override
public void chatRoomClosed(ChatRoom room) {
    super.chatRoomClosed(room);
    if (OTRProperties.getInstance().getOTRCloseOnChatClose()) {
        if (room instanceof ChatRoomImpl) {
            ChatRoomImpl myroom = (ChatRoomImpl) room;
            if (_activeSessions.containsKey(myroom.getParticipantJID())) {
                OTRSession searchedSession = _activeSessions.get(myroom.getParticipantJID());
                searchedSession.stopSession();
                _activeSessions.remove(myroom.getParticipantJID());
            }
        }
    }
}
Also used : ChatRoomImpl(org.jivesoftware.spark.ui.rooms.ChatRoomImpl) OTRSession(org.jivesoftware.spark.otrplug.impl.OTRSession)

Aggregations

OTRSession (org.jivesoftware.spark.otrplug.impl.OTRSession)1 ChatRoomImpl (org.jivesoftware.spark.ui.rooms.ChatRoomImpl)1