diff --git a/NoteHub.cs b/NoteHub.cs index 791d375..20ad638 100644 --- a/NoteHub.cs +++ b/NoteHub.cs @@ -25,11 +25,13 @@ namespace BinaryDad.Notes { noteService.Save(content, noteName); + // find all other connections except for the current one var clientConnections = NoteContext.ClientNotes .Where(c => c.Value == noteName && c.Key != Context.ConnectionId) .Select(c => c.Key) .ToList(); + // update note for all other clients await Clients .Clients(clientConnections) .SendAsync("updateNote", content);