aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/muc
diff options
context:
space:
mode:
authorhristoterezov <hristo@jitsi.org>2013-12-10 18:27:56 +0200
committerhristoterezov <hristo@jitsi.org>2013-12-10 18:27:56 +0200
commit5501e53360c0c7192a843e04a2d7e28baba487af (patch)
treefba47ca4fa7e53c7c6b9824c2d1aa7b7bcbb438e /src/net/java/sip/communicator/impl/muc
parent3fbb6490f6f9ed27e38edc7d97a22833c24b7a6d (diff)
downloadjitsi-5501e53360c0c7192a843e04a2d7e28baba487af.zip
jitsi-5501e53360c0c7192a843e04a2d7e28baba487af.tar.gz
jitsi-5501e53360c0c7192a843e04a2d7e28baba487af.tar.bz2
Fixes the open action for chat room contacts.
Diffstat (limited to 'src/net/java/sip/communicator/impl/muc')
-rw-r--r--src/net/java/sip/communicator/impl/muc/MUCCustomContactActionService.java46
-rw-r--r--src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java44
2 files changed, 23 insertions, 67 deletions
diff --git a/src/net/java/sip/communicator/impl/muc/MUCCustomContactActionService.java b/src/net/java/sip/communicator/impl/muc/MUCCustomContactActionService.java
index 34e6e70..2498654 100644
--- a/src/net/java/sip/communicator/impl/muc/MUCCustomContactActionService.java
+++ b/src/net/java/sip/communicator/impl/muc/MUCCustomContactActionService.java
@@ -162,51 +162,7 @@ public class MUCCustomContactActionService
@Override
public void run()
{
- String[] joinOptions;
- String subject = null;
- if(chatRoomWrapper.getChatRoom() == null)
- {
- // this is not a server persistent room we must create it
- // and join
- chatRoomWrapper =
- MUCActivator.getMUCService().createChatRoom(
- chatRoomWrapper.getChatRoomName(),
- chatRoomWrapper.getParentProvider()
- .getProtocolProvider(),
- new ArrayList<String>(),
- "",
- false,
- false,
- true);
- }
-
- if(!chatRoomWrapper.getChatRoom().isJoined())
- {
- String nickName = null;
-
- nickName =
- ConfigurationUtils.getChatRoomProperty(
- chatRoomWrapper.getParentProvider()
- .getProtocolProvider(), chatRoomWrapper
- .getChatRoomID(), "userNickName");
- if(nickName == null)
- {
- joinOptions = ChatRoomJoinOptionsDialog.getJoinOptions(
- chatRoomWrapper.getParentProvider()
- .getProtocolProvider(),
- chatRoomWrapper.getChatRoomID());
- nickName = joinOptions[0];
- subject = joinOptions[1];
- }
-
- if (nickName != null)
- MUCActivator.getMUCService().joinChatRoom(
- chatRoomWrapper,nickName, null, subject);
- else
- return;
- }
-
- MUCActivator.getUIService().openChatRoomWindow(chatRoomWrapper);
+ MUCActivator.getMUCService().openChatRoom(chatRoomWrapper);
}
},
new MUCCustomActionRunnable()
diff --git a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
index 4885f61..e05842c 100644
--- a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java
@@ -1000,31 +1000,31 @@ public class MUCServiceImpl
}
- String savedNick =
- ConfigurationUtils.getChatRoomProperty(room
- .getParentProvider().getProtocolProvider(), room
- .getChatRoomID(), "userNickName");
-
- if (savedNick == null)
+ if(!room.getChatRoom().isJoined())
{
- String[] joinOptions = ChatRoomJoinOptionsDialog.getJoinOptions(
- room.getParentProvider().getProtocolProvider(),
- room.getChatRoomID());
- String nickName = joinOptions[0];
- if(nickName == null)
- return;
-
- if (!room.getChatRoom().isJoined())
+ String savedNick =
+ ConfigurationUtils.getChatRoomProperty(room
+ .getParentProvider().getProtocolProvider(), room
+ .getChatRoomID(), "userNickName");
+ String subject = null;
+
+ if (savedNick == null)
{
- joinChatRoom(room, nickName, null,
- joinOptions[1]);
+ String[] joinOptions = ChatRoomJoinOptionsDialog.getJoinOptions(
+ room.getParentProvider().getProtocolProvider(),
+ room.getChatRoomID());
+ savedNick = joinOptions[0];
+ subject = joinOptions[1];
+
}
-
- }
- else
- {
- if (!room.getChatRoom().isJoined())
- joinChatRoom(room, savedNick, null);
+
+ if (savedNick != null)
+ {
+ joinChatRoom(room, savedNick, null,
+ subject);
+ }
+ else
+ return;
}
MUCActivator.getUIService().openChatRoomWindow(room);