feat: add control-plane identity and management console
Build web service image / build (push) Successful in 2m7s

This commit is contained in:
2026-09-27 20:27:31 +08:00
parent 083aeef18a
commit 8760fa49f0
40 changed files with 4827 additions and 2431 deletions
@@ -4,6 +4,34 @@ namespace WxAgent.Core;
public static class ReportingAuthorization
{
public static ReportingConfig ForVerifiedAccounts(ReportingConfig configured, IEnumerable<string> verifiedAccountIds)
{
ArgumentNullException.ThrowIfNull(configured);
ArgumentNullException.ThrowIfNull(verifiedAccountIds);
var accounts = verifiedAccountIds
.Where(accountId => !string.IsNullOrWhiteSpace(accountId))
.Distinct(StringComparer.Ordinal)
.Select(accountId => new AccountReportingConfig
{
AccountId = accountId,
Enabled = true,
AllowedChats =
[
new AllowedChat { Type = ReportingChatType.Group, ChatId = "*", Enabled = true, IdentityVerified = true },
new AllowedChat { Type = ReportingChatType.Private, ChatId = "*", Enabled = true, IdentityVerified = true }
]
})
.ToArray();
return configured with
{
Enabled = true,
ConfigVersion = Math.Max(1, configured.ConfigVersion),
Accounts = accounts
};
}
public static ReportingDecision Check(
ReportingConfig? config,
string accountId,