add comments
This commit is contained in:
parent
b89a557af1
commit
c9f22e0978
@ -25,11 +25,13 @@ namespace BinaryDad.Notes
|
|||||||
{
|
{
|
||||||
noteService.Save(content, noteName);
|
noteService.Save(content, noteName);
|
||||||
|
|
||||||
|
// find all other connections except for the current one
|
||||||
var clientConnections = NoteContext.ClientNotes
|
var clientConnections = NoteContext.ClientNotes
|
||||||
.Where(c => c.Value == noteName && c.Key != Context.ConnectionId)
|
.Where(c => c.Value == noteName && c.Key != Context.ConnectionId)
|
||||||
.Select(c => c.Key)
|
.Select(c => c.Key)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
// update note for all other clients
|
||||||
await Clients
|
await Clients
|
||||||
.Clients(clientConnections)
|
.Clients(clientConnections)
|
||||||
.SendAsync("updateNote", content);
|
.SendAsync("updateNote", content);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user