namespace MyTelegram.Messenger.Services.Impl;

public class DomainEventDataProcessor(ICachedReadModelUpdater cachedReadModelManager) : IDataProcessor<IDomainEvent>, ITransientDependency
{
    public Task ProcessAsync(IDomainEvent data)
    {
        return cachedReadModelManager.UpdateAsync([data], CancellationToken.None);
    }
}