feat: add control-plane identity and management console
Build web service image / build (push) Successful in 2m7s
Build web service image / build (push) Successful in 2m7s
This commit is contained in:
@@ -17,12 +17,21 @@ public sealed class EventPump(IAgentBackend backend, EventHub hub, ServiceOption
|
||||
{
|
||||
try
|
||||
{
|
||||
var remote = options.Remote;
|
||||
var reporting = options.Reporting;
|
||||
if (remoteQueue is not null && remote is { IsConfigured: true })
|
||||
{
|
||||
var accounts = await backend.AccountsAsync(stoppingToken, refreshUiIdentity: false);
|
||||
reporting = ReportingAuthorization.ForVerifiedAccounts(options.Reporting,
|
||||
accounts.Where(RemoteAgentHostedService.HasLiveWeChatBinding).Select(account => account.AccountId));
|
||||
}
|
||||
|
||||
await foreach (var item in source.ListenAsync(stoppingToken))
|
||||
{
|
||||
if (remoteQueue is not null && options.Remote is { IsConfigured: true } remote && item.Kind == "message"
|
||||
if (remoteQueue is not null && remote is { IsConfigured: true } && item.Kind == "message"
|
||||
&& item.ChatId is { Length: > 0 } chatId && item.ChatType is { } chatType)
|
||||
{
|
||||
_ = remoteQueue.Enqueue(options.Reporting, remote.NodeId!, item.AccountId, chatId, chatType,
|
||||
_ = remoteQueue.Enqueue(reporting, remote.NodeId!, item.AccountId, chatId, chatType,
|
||||
item.Kind, item.At, item.Content);
|
||||
}
|
||||
var localItem = item with { Content = null };
|
||||
|
||||
Reference in New Issue
Block a user