Issue #2563 fixed room id creation

room ids were being generated with the hostname used to connect to the server
they needed to be generated with what the server calls itself


Former-commit-id: 82716fa147 [formerly 82716fa147 [formerly 99fb102b270baa5c45f1c9963f47344ede93a34a]]
Former-commit-id: 66df912a4e
Former-commit-id: 649483d3fd
This commit is contained in:
Brian Clements 2014-01-07 13:04:24 -06:00
parent 22f322d887
commit 33b9ecb2ab
3 changed files with 9 additions and 5 deletions

View file

@ -37,6 +37,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.ISession;
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
import com.raytheon.uf.viz.collaboration.comm.identity.roster.ISubscriptionResponder;
import com.raytheon.uf.viz.collaboration.comm.provider.event.UserPresenceChangedEvent;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
/**
@ -56,6 +57,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
* ------------ ---------- ----------- --------------------------
* Mar 16, 2012 jkorman Initial creation
* Dec 6, 2013 2561 bclement removed ECF
* Jan 07, 2013 2563 bclement fixed id parsing in auto responder
*
* </pre>
*
@ -77,8 +79,7 @@ public class AccountManager implements IAccountManager {
if (type == null) {
return;
}
UserId fromId = new UserId(pres.getFrom(), sessionManager
.getXmppConnection().getHost());
UserId fromId = IDConverter.convertFrom(pres.getFrom());
switch (type) {
case subscribe:
handleSubRequest(fromId);

View file

@ -106,6 +106,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
* Dec 18, 2013 2562 bclement added smack compression, fixed invite parsing
* Dec 19, 2013 2563 bclement added connection listener,
* added better error message on failed connection
* Jan 07, 2013 2563 bclement use getServiceName instead of getHost when creating room id
*
* </pre>
*
@ -452,7 +453,8 @@ public class CollaborationConnection implements IEventPublisher {
* @return false on error
*/
public boolean venueExistsOnServer(String venueName) {
String roomId = VenueSession.getRoomId(connection.getHost(), venueName);
String roomId = VenueSession.getRoomId(connection.getServiceName(),
venueName);
try {
return VenueSession.roomExistsOnServer(connection, roomId);
} catch (XMPPException e) {

View file

@ -87,6 +87,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
* Dec 6, 2013 2561 bclement removed ECF
* Dec 18, 2013 2562 bclement moved data to packet extension
* Dec 19, 2013 2563 bclement status listeners now send all events to bus
* Jan 07, 2013 2563 bclement use getServiceName instead of getHost when creating room id
*
* </pre>
*
@ -255,7 +256,7 @@ public class VenueSession extends BaseSession implements IVenueSession {
throws CollaborationException {
CollaborationConnection manager = getSessionManager();
XMPPConnection conn = manager.getXmppConnection();
String roomId = getRoomId(conn.getHost(), venueName);
String roomId = getRoomId(conn.getServiceName(), venueName);
this.muc = new MultiUserChat(conn, roomId);
this.venue = new Venue(conn, muc);
createListeners();
@ -287,7 +288,7 @@ public class VenueSession extends BaseSession implements IVenueSession {
try {
CollaborationConnection manager = getSessionManager();
XMPPConnection conn = manager.getXmppConnection();
String roomId = getRoomId(conn.getHost(), venueName);
String roomId = getRoomId(conn.getServiceName(), venueName);
if (roomExistsOnServer(conn, roomId)) {
throw new CollaborationException("Session name already in use");
}