Skip to content

Commit

Permalink
fix Bug 71657
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimChegulov committed Nov 14, 2024
1 parent e80b931 commit c626c15
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions products/ASC.Files/Core/Core/FileStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,42 +899,42 @@ public async Task<Folder<T>> UpdateRoomAsync<T>(T folderId, UpdateRoomRequest up
if (updateData.Indexing.Value)
{
await ReOrderAsync(folder.Id, true, true);
_ = filesMessageService.SendAsync(MessageAction.RoomIndexingEnabled, folder);
await filesMessageService.SendAsync(MessageAction.RoomIndexingEnabled, folder);
}
else
{
_ = filesMessageService.SendAsync(MessageAction.RoomIndexingDisabled, folder);
await filesMessageService.SendAsync(MessageAction.RoomIndexingDisabled, folder);
}
}

if (denyDownloadChanged)
{
_ = filesMessageService.SendAsync(updateData.DenyDownload.Value
await filesMessageService.SendAsync(updateData.DenyDownload.Value
? MessageAction.RoomDenyDownloadEnabled
: MessageAction.RoomDenyDownloadDisabled,
folder, folder.Title);
}

if (colorChanged)
{
_ = filesMessageService.SendAsync(MessageAction.RoomColorChanged, folder, folder.Title);
await filesMessageService.SendAsync(MessageAction.RoomColorChanged, folder, folder.Title);
}

if (coverChanged)
{
_ = filesMessageService.SendAsync(MessageAction.RoomCoverChanged, folder, folder.Title);
await filesMessageService.SendAsync(MessageAction.RoomCoverChanged, folder, folder.Title);
}

if (lifetimeChanged)
{
if (updateData.Lifetime.Enabled.HasValue && !updateData.Lifetime.Enabled.Value)
{
_ = filesMessageService.SendAsync(MessageAction.RoomLifeTimeDisabled, folder);
await filesMessageService.SendAsync(MessageAction.RoomLifeTimeDisabled, folder);

}
else
{
_ = filesMessageService.SendAsync(MessageAction.RoomLifeTimeSet, folder, lifetime.Value.ToString(), lifetime.Period.ToStringFast(),
await filesMessageService.SendAsync(MessageAction.RoomLifeTimeSet, folder, lifetime.Value.ToString(), lifetime.Period.ToStringFast(),
lifetime.DeletePermanently.ToString());
}
}
Expand All @@ -944,28 +944,28 @@ public async Task<Folder<T>> UpdateRoomAsync<T>(T folderId, UpdateRoomRequest up
{
if (isRoom)
{
_ = filesMessageService.SendAsync(MessageAction.RoomRenamed, oldTitle, folder, folder.Title);
await filesMessageService.SendAsync(MessageAction.RoomRenamed, oldTitle, folder, folder.Title);
}
else
{
_ = filesMessageService.SendAsync(MessageAction.FolderRenamed, folder, folder.Title);
await filesMessageService.SendAsync(MessageAction.FolderRenamed, folder, folder.Title);
}
}

if (isRoom && quotaChanged)
{
if (updateData.Quota >= 0)
{
_ = filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomChanged, updateData.Quota.ToString(), [folder.Title]);
await filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomChanged, updateData.Quota.ToString(), [folder.Title]);
}
else if(updateData.Quota == -1)
{
_ = filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomDisabled, folder.Title);
await filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomDisabled, folder.Title);
}
else
{
var quotaRoomSettings = await settingsManager.LoadAsync<TenantRoomQuotaSettings>();
_ = filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomDefault, quotaRoomSettings.DefaultQuota.ToString(), [folder.Title]);
await filesMessageService.SendAsync(MessageAction.CustomQuotaPerRoomDefault, quotaRoomSettings.DefaultQuota.ToString(), [folder.Title]);
}
}

Expand Down

0 comments on commit c626c15

Please sign in to comment.