Files
xAiModels/Configurations/Entities/XAiMessageMappingAction.cs
T
2026-08-03 09:44:56 +03:30

48 lines
1.3 KiB
C#

using System;
using AutoMapper;
using xAiModels.Models.Dtos;
using xAiModels.Models.Entities;
using xIdentityService.Extensions;
using xIdentityService.Interfaces;
namespace xAiModels.Configurations.Entities
{
public class XAiMessageMappingAction : IMappingAction<XAiMessage, XAiMessageDto>
{
private readonly IXIdentityProvider identityProvider;
public XAiMessageMappingAction(
IXIdentityProvider identityProvider
)
{
this.identityProvider = identityProvider;
}
public void Process(
XAiMessage source,
XAiMessageDto destination,
ResolutionContext context
)
{
//
// Retrieve Owner ...
var device = identityProvider.GetDevice();
var ownerUserInfo = identityProvider.GetUserInfo(
device: device,
userSelectByParam: source.OwnerId
)
.GetAwaiter()
.GetResult();
var owner = ownerUserInfo.ToXPersonDto();
//
// Setting Owner ...
destination.Owner = owner;
//
// Retrieve Owner ...
// Retrieve Conversation ...
throw new NotImplementedException();
}
}
}