mirror of
https://github.com/bitwarden/server
synced 2025-12-20 18:23:44 +00:00
reference OrganizationMembership instead
This commit is contained in:
@@ -19,9 +19,12 @@ namespace Bit.Notifications
|
||||
{
|
||||
var currentContext = new CurrentContext();
|
||||
currentContext.Build(Context.User);
|
||||
foreach(var org in currentContext.Organizations)
|
||||
if(currentContext.Organizations != null)
|
||||
{
|
||||
await Groups.AddToGroupAsync(Context.ConnectionId, $"Organization_{org.Id}");
|
||||
foreach(var org in currentContext.Organizations)
|
||||
{
|
||||
await Groups.AddToGroupAsync(Context.ConnectionId, $"Organization_{org.Id}");
|
||||
}
|
||||
}
|
||||
_connectionCounter.Increment();
|
||||
await base.OnConnectedAsync();
|
||||
@@ -31,9 +34,12 @@ namespace Bit.Notifications
|
||||
{
|
||||
var currentContext = new CurrentContext();
|
||||
currentContext.Build(Context.User);
|
||||
foreach(var org in currentContext.Organizations)
|
||||
if(currentContext.Organizations != null)
|
||||
{
|
||||
await Groups.RemoveFromGroupAsync(Context.ConnectionId, $"Organization_{org.Id}");
|
||||
foreach(var org in currentContext.Organizations)
|
||||
{
|
||||
await Groups.RemoveFromGroupAsync(Context.ConnectionId, $"Organization_{org.Id}");
|
||||
}
|
||||
}
|
||||
_connectionCounter.Decrement();
|
||||
await base.OnDisconnectedAsync(exception);
|
||||
|
||||
Reference in New Issue
Block a user