.getRemoteUsersWithReadOnlyAccess();
final List<User> remoteUsers = sarosSession.getRemoteUsers();
if (activity instanceof TextEditActivity) {
TextEditActivity textEdit = (TextEditActivity) activity;
result.add(new QueueItem(host, jupiterClient.generate(textEdit)));
/**
* This activityDataObject still needs to be sent to all users with
* {@link User.Permission#READONLY_ACCESS}, because they are not
* notified by receiveJupiterActivityHostSide(...).
*/
if (sarosSession.isHost()
&& remoteUsersWithReadOnlyAccess.size() > 0) {
result.add(new QueueItem(remoteUsersWithReadOnlyAccess,
activity));
}
} else if (activity instanceof ChecksumActivity) {
ChecksumActivity checksumActivityDataObject = (ChecksumActivity) activity;
/**
* Only the host can generate Checksums
*/
assert sarosSession.isHost();
// Send Jupiter specific checksum to ConcurrentDocumentServer
result.add(new QueueItem(host, jupiterClient
.withTimestamp(checksumActivityDataObject)));
if (remoteUsersWithReadOnlyAccess.size() > 0)
/**
* Send general checksum to all users with
* {@link User.Permission#READONLY_ACCESS}
*/
result.add(new QueueItem(remoteUsersWithReadOnlyAccess,
checksumActivityDataObject));
} else {
if (remoteUsers.size() > 0)
result.add(new QueueItem(remoteUsers, activity));
}
return result;
}