Omaha #4117 fix 14.3/14.4 shared display interoperability bug
14.4 now defaults to sending directly to user id (if known) Change-Id: Id0d78a6f6287cebe7b6f110143b1b6a735078e5d Former-commit-id:62a0f31c60
[formerly2d98b0616a
[formerly 424c3630897847a6b2362418618d0806093223ce]] Former-commit-id:2d98b0616a
Former-commit-id:9485b0354e
This commit is contained in:
parent
a2d87f74f7
commit
a7e397d999
1 changed files with 13 additions and 5 deletions
|
@ -108,6 +108,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
|
|||
* May 14, 2014 3061 bclement added better checks for when to send invite/session payloads
|
||||
* Jun 16, 2014 3288 bclement feed venue configuration changes
|
||||
* Jun 17, 2014 3078 bclement peer to peer communication uses private chat
|
||||
* Feb 12, 2015 4117 bclement fixed 14.3/14.4 peer-to-peer messaging
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -232,10 +233,6 @@ public class SharedDisplaySession extends VenueSession implements
|
|||
if (obj == null) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* TODO it would be nice to use MUC private chat for this, but it would
|
||||
* break backwards compatibility
|
||||
*/
|
||||
boolean doSend = true;
|
||||
if (hasRole(SharedDisplayRole.DATA_PROVIDER)
|
||||
&& !isSharedDisplayClient(participant)) {
|
||||
|
@ -248,9 +245,20 @@ public class SharedDisplaySession extends VenueSession implements
|
|||
doSend = false;
|
||||
}
|
||||
if (doSend) {
|
||||
String to;
|
||||
/*
|
||||
* clients older than 14.4 expect peer to peer messages sent
|
||||
* directly to the user ID. When all clients are 14.4 or above it
|
||||
* will be safe to always send to the room handle.
|
||||
*/
|
||||
if (participant.hasActualUserId()) {
|
||||
to = participant.getUserid().getFQName();
|
||||
} else {
|
||||
to = participant.getFQName();
|
||||
}
|
||||
SessionPayload payload = new SessionPayload(PayloadType.Command,
|
||||
obj);
|
||||
Message msg = new Message(participant.getFQName(), Type.normal);
|
||||
Message msg = new Message(to, Type.normal);
|
||||
msg.addExtension(payload);
|
||||
msg.setFrom(conn.getUser());
|
||||
msg.setProperty(Tools.PROP_SESSION_ID, getSessionId());
|
||||
|
|
Loading…
Add table
Reference in a new issue