Authorize data sync on connected agent registration

This commit is contained in:
2026-09-22 16:47:52 +08:00
parent 49c07cca30
commit e26535781d
17 changed files with 194 additions and 110 deletions
@@ -32,7 +32,7 @@ public static class ReportingAuthorization
return Denied("AccountNotAuthorized");
var chat = account.AllowedChats.FirstOrDefault(candidate =>
candidate.Type == chatType && string.Equals(candidate.ChatId, chatId, StringComparison.Ordinal));
candidate.Type == chatType && (candidate.ChatId == "*" || string.Equals(candidate.ChatId, chatId, StringComparison.Ordinal)));
if (chat is null)
return Denied("ChatNotAuthorized");
if (!chat.Enabled)