message: Enable presence for clients not in the qurum
diff: @@ -2785,7 +2785,8 @@ export class FlowCursor extends Cursor {
  // this would allow a user ID to be put on the wire which can then be mapped
  // back to an email, name, etc...
  const name = user.name;
  - const nameParts = name.split(" ");
  + // Name usually contains " ". Otherwise it's a clientId with "-".
  + const nameParts = name.indexOf(" ") !== -1 ? name.split(" ") : name.split("-");
  let initials = "";
  for (const part of nameParts) {
  initials += part.substring(0, 1);
  @@ -5341,7 +5342,6 @@ export class FlowView extends ui.Component implements SearchMenu.ISearchMenuHost
  if (segoff.segment) {
  const docClient = this.collabDocument.getClient(clientId);
  - if (docClient && docClient.client.type === "browser") {
  const localPresenceInfo = {
  clientId,
  fresh: true,
  @@ -5351,10 +5351,10 @@ export class FlowView extends ui.Component implements SearchMenu.ISearchMenuHost
  this.presenceVector.get(clientId).presenceColor :
  presenceColors[this.presenceVector.size % presenceColors.length],
  shouldShowCursor: () => {
  - return this.collabDocument.clientId !== clientId &&
  - Array.from(this.collabDocument.getClients().keys()).indexOf(clientId) !== -1;
  + return this.collabDocument.clientId !== clientId;
  },
  - user: docClient.client.user,
  + // Temporary: Use the clientId as name if the user is not a part of the quorum.
  + user: docClient ? docClient.client.user : { name : clientId },
  } as ILocalPresenceInfo;
  if (remotePresenceInfo.origMark >= 0) {
  const markSegoff = this.sharedString.getContainingSegment(remotePresenceInfo.origMark);
  @@ -5367,7 +5367,6 @@ export class FlowView extends ui.Component implements SearchMenu.ISearchMenuHost
  this.updatePresenceVector(localPresenceInfo);
  }
  }
  - }
  private broadcastPresence() {
  if (this.presenceSignal && this.collabDocument.isConnected) {
  