26 lines
763 B
C#
26 lines
763 B
C#
|
|
using Common.Contracts.Infrastructure;
|
|
using Hushian.Application.Models.Message;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
namespace Hushian.Infrastructure
|
|
{
|
|
public class MessageSender : IMessageSender
|
|
{
|
|
private readonly Melipayamak.RestClient _restClient;
|
|
private MessageSetting _msgSettings;
|
|
public MessageSender(Melipayamak.RestClient restClient, IOptions<MessageSetting> msgSettings)
|
|
{
|
|
_restClient = restClient;
|
|
_msgSettings = msgSettings.Value;
|
|
}
|
|
|
|
public Task<bool> SendMassage(Message message)
|
|
{
|
|
string From = _msgSettings.From;
|
|
// _restClient.Send(message.To, From, message.msg, false);
|
|
return Task.Run(()=>true);
|
|
}
|
|
}
|
|
}
|