send disable moderator status to user on ownership transfer

This commit is contained in:
Stanley Dimant
2022-10-06 22:34:32 +02:00
parent 7f3029e82c
commit a996fc7689

View File

@@ -558,6 +558,13 @@ public partial class MareHub
var groupPairs = await _dbContext.GroupPairs.Where(p => p.GroupGID == gid).Select(p => p.GroupUserUID).ToListAsync().ConfigureAwait(false); var groupPairs = await _dbContext.GroupPairs.Where(p => p.GroupGID == gid).Select(p => p.GroupUserUID).ToListAsync().ConfigureAwait(false);
await Clients.Users(uid).SendAsync(Api.OnGroupChange, new GroupDto()
{
GID = gid,
OwnedBy = string.IsNullOrEmpty(group.Owner.Alias) ? group.Owner.UID : group.Owner.Alias,
IsModerator = false
}).ConfigureAwait(false);
await Clients.Users(groupPairs).SendAsync(Api.OnGroupChange, new GroupDto() await Clients.Users(groupPairs).SendAsync(Api.OnGroupChange, new GroupDto()
{ {
GID = gid, GID = gid,