From c9f22e09782516eb17679e248b40f9a8fea5d394 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 10 Mar 2023 03:14:28 +0000 Subject: [PATCH] add comments --- NoteHub.cs | 2 ++ 1 file changed, 2 insertions(+) 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);