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:40763433f0
[formerlya78b1d96af
] [formerly82716fa147
] [formerly40763433f0
[formerlya78b1d96af
] [formerly82716fa147
] [formerly66df912a4e
[formerly82716fa147
[formerly 99fb102b270baa5c45f1c9963f47344ede93a34a]]]] Former-commit-id:66df912a4e
Former-commit-id:e7602389b6
[formerly12c7371565
] [formerly ce480f2f3d00e3ac778f4d35236875333682e387 [formerly649483d3fd
]] Former-commit-id: 34bfd3ac6166cb7be785f4335c44e90419201b9a [formerly33b9ecb2ab
] Former-commit-id:7da97f676f
This commit is contained in:
parent
5e09af067a
commit
cefb2d3aff
3 changed files with 9 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue