Compare commits
2
Commits
2b7209c5fb
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c75ba03d | ||
|
|
3e57ed6af9 |
@@ -15,7 +15,7 @@ namespace xBotService.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verification Code Time to Live in Minute ...
|
/// Verification Code Time to Live in Minute ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int VerificationCodeTTL { get; set; } = 300;
|
public int VerificationCodeTTL { get; set; } = 5;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default Timeout ...
|
/// Default Timeout ...
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ namespace xBotService.Constants
|
|||||||
این کد را با ورود به سامانه در بخش پروفایل کاربری وارد کنید
|
این کد را با ورود به سامانه در بخش پروفایل کاربری وارد کنید
|
||||||
""";
|
""";
|
||||||
public const string XBotRequestVerificationCodeMessageText = "برای دریافت کد اعتبارسنجی روی دکمه زیر کلیک کنید:";
|
public const string XBotRequestVerificationCodeMessageText = "برای دریافت کد اعتبارسنجی روی دکمه زیر کلیک کنید:";
|
||||||
|
public const string XBotUserVerificationSucceedMessageText = "کاربر گرامی، اعتبار سنجی شما با موفقیت انجام شد.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,5 +6,7 @@ namespace xBotService.Constants
|
|||||||
public const string XOffest = "offset";
|
public const string XOffest = "offset";
|
||||||
public const string XTimeout = "timeout";
|
public const string XTimeout = "timeout";
|
||||||
public const string XTokenParam = "{xBotToken}";
|
public const string XTokenParam = "{xBotToken}";
|
||||||
|
public const string XTTLInMinuteParam = "{xTTLInMinute}";
|
||||||
|
public const string XVerificationTokenParam = "{xVerificationCode}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,19 +12,22 @@ using System.Collections.Generic;
|
|||||||
using xIdentityService.Interfaces;
|
using xIdentityService.Interfaces;
|
||||||
using xIdentityService.Controllers;
|
using xIdentityService.Controllers;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using xBotService.Reciever;
|
||||||
|
|
||||||
namespace xBotService.Controllers
|
namespace xBotService.Controllers
|
||||||
{
|
{
|
||||||
public abstract class XBotProviderControllerBase : XBaseIdentityApiV1Controller
|
public abstract class XBotProviderControllerBase : XBaseIdentityApiV1Controller
|
||||||
{
|
{
|
||||||
private readonly IXBotProvider botProvider;
|
private readonly IXBotProvider botProvider;
|
||||||
|
private readonly XBotBotUpdateRecieverBackgroundService botHandler;
|
||||||
|
|
||||||
protected XBotProviderControllerBase(
|
protected XBotProviderControllerBase(
|
||||||
IXBotProvider botProvider,
|
IXBotProvider botProvider,
|
||||||
ILogger<XBotProviderControllerBase> logger,
|
|
||||||
XAppConfiguration appConfiguration,
|
XAppConfiguration appConfiguration,
|
||||||
IXIdentityProvider identityProvider,
|
IXIdentityProvider identityProvider,
|
||||||
XValidationProvider validationProvider
|
XValidationProvider validationProvider,
|
||||||
|
ILogger<XBotProviderControllerBase> logger,
|
||||||
|
XBotBotUpdateRecieverBackgroundService botHandler
|
||||||
) : base(
|
) : base(
|
||||||
logger,
|
logger,
|
||||||
appConfiguration,
|
appConfiguration,
|
||||||
@@ -33,6 +36,7 @@ namespace xBotService.Controllers
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.botProvider = botProvider;
|
this.botProvider = botProvider;
|
||||||
|
this.botHandler = botHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -130,200 +134,97 @@ namespace xBotService.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/ShowVerificationMenu")]
|
[HttpPost("{botUserId}/ShowVerificationMenu")]
|
||||||
// public virtual async Task<ActionResult<XBotMessageResponse>> ShowVerificationMenu(
|
public virtual async Task<ActionResult<XBotMessage>> ShowVerificationMenu(
|
||||||
// [FromRoute] long chatId,
|
[FromRoute] long botUserId,
|
||||||
// CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
// )
|
)
|
||||||
// {
|
{
|
||||||
// //
|
//
|
||||||
// try
|
try
|
||||||
// {
|
{
|
||||||
// //
|
//
|
||||||
// // Validation ...
|
// Validation ...
|
||||||
// if (!ModelState.IsValid)
|
if (botUserId <= 0)
|
||||||
// {
|
{
|
||||||
// XException.InvalidArgs.Throw();
|
XException.InvalidArgs.Throw();
|
||||||
// }
|
}
|
||||||
// if (chatId <= 0)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var result = await botProvider.SendVerificationMenu(
|
var result = await botProvider.ShowVerificationMenu(
|
||||||
// chatId: chatId,
|
botUserId: botUserId,
|
||||||
// cancellationToken: cancellationToken
|
cancellationToken: cancellationToken
|
||||||
// );
|
);
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return Ok(result.ToDynamicObject());
|
return Ok(result.ToDynamicObject());
|
||||||
// }
|
}
|
||||||
// catch (Exception ex)
|
catch (Exception ex)
|
||||||
// {
|
{
|
||||||
// //
|
//
|
||||||
// var result = GetExceptionActionResult(ex);
|
var result = GetExceptionActionResult(ex);
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/SendVerificationCode")]
|
[HttpPost("{token}/VerifyUser")]
|
||||||
// public virtual async Task<ActionResult<XBotMessageResponse>> SendVerificationCode(
|
public virtual async Task<ActionResult<XBotMessage>> VerifyUser(
|
||||||
// [FromRoute] long chatId,
|
[FromRoute] string token,
|
||||||
// [FromQuery] string code,
|
CancellationToken cancellationToken = default
|
||||||
// [FromQuery] int ttlSeconds,
|
)
|
||||||
// CancellationToken cancellationToken = default
|
{
|
||||||
// )
|
//
|
||||||
// {
|
try
|
||||||
// //
|
{
|
||||||
// try
|
//
|
||||||
// {
|
// Validation ...
|
||||||
// //
|
if (token.IsNullOrEmpty())
|
||||||
// // Validation ...
|
{
|
||||||
// if (!ModelState.IsValid)
|
XException.InvalidArgs.Throw();
|
||||||
// {
|
}
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
// if (chatId <= 0 || code.IsNullOrEmpty() || ttlSeconds < 60)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var result = await botProvider.SendVerificationCode(
|
var userInfo = await GetUserInfo();
|
||||||
// code: code,
|
|
||||||
// chatId: chatId,
|
|
||||||
// ttlSeconds: ttlSeconds,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return Ok(result.ToDynamicObject());
|
var result = await botProvider.VerifyUser(
|
||||||
// }
|
token: token,
|
||||||
// catch (Exception ex)
|
userInfo: userInfo,
|
||||||
// {
|
cancellationToken: cancellationToken
|
||||||
// //
|
);
|
||||||
// var result = GetExceptionActionResult(ex);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// [HttpPost("{id}/AnswerCallback")]
|
//
|
||||||
// public virtual async Task<ActionResult<XBotMessageResponse>> AnswerCallbackQuery(
|
return Ok(result.ToDynamicObject());
|
||||||
// [FromRoute] string callbackQueryId,
|
}
|
||||||
// [FromQuery] string text = null,
|
catch (Exception ex)
|
||||||
// [FromQuery] bool showAlert = false,
|
{
|
||||||
// CancellationToken cancellationToken = default
|
//
|
||||||
// )
|
var result = GetExceptionActionResult(ex);
|
||||||
// {
|
return result;
|
||||||
// //
|
}
|
||||||
// try
|
}
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Validation ...
|
|
||||||
// if (!ModelState.IsValid ||
|
|
||||||
// callbackQueryId.IsNullOrEmpty())
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
[HttpPost("Refresh")]
|
||||||
// var result = await botProvider.AnswerCallbackQuery(
|
public virtual async Task<ActionResult> Refresh(
|
||||||
// text: text,
|
CancellationToken cancellationToken = default
|
||||||
// showAlert: showAlert,
|
)
|
||||||
// callbackQueryId: callbackQueryId,
|
{
|
||||||
// cancellationToken: cancellationToken
|
//
|
||||||
// );
|
try
|
||||||
|
{
|
||||||
|
//
|
||||||
|
await botHandler.Refresh(cancellationToken);
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return Ok(result.ToDynamicObject());
|
return Ok();
|
||||||
// }
|
}
|
||||||
// catch (Exception ex)
|
catch (Exception ex)
|
||||||
// {
|
{
|
||||||
// //
|
//
|
||||||
// var result = GetExceptionActionResult(ex);
|
var result = GetExceptionActionResult(ex);
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// [HttpPost("{chatId}/RemoveInlineKeyboard")]
|
|
||||||
// public virtual async Task<ActionResult<XBotMessageResponse>> RemoveInlineKeyboard(
|
|
||||||
// [FromRoute] long chatId,
|
|
||||||
// [FromQuery] long messageId,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Validation ...
|
|
||||||
// if (!ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
// if (chatId <= 0 || messageId <= 0)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
|
||||||
// var result = await botProvider.RemoveInlineKeyboard(
|
|
||||||
// chatId: chatId,
|
|
||||||
// messageId: messageId,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// return Ok(result.ToDynamicObject());
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var result = GetExceptionActionResult(ex);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// [HttpPost("Webhook")]
|
|
||||||
// public virtual async Task<ActionResult<bool>> SetWebhook(
|
|
||||||
// [FromQuery] string webhookUrl,
|
|
||||||
// [FromQuery] string secretToken = null,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Validation ...
|
|
||||||
// if (!ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
// await ValidationProvider
|
|
||||||
// .GroupValidationBuilder()
|
|
||||||
// .AddNotEmpty(webhookUrl)
|
|
||||||
// .AddUrl(webhookUrl)
|
|
||||||
// .ValidateGroupAsync();
|
|
||||||
|
|
||||||
// //
|
|
||||||
// var result = await botProvider.SetWebhook(
|
|
||||||
// webhookUrl: webhookUrl,
|
|
||||||
// secretToken: secretToken,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// return Ok(result);
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var result = GetExceptionActionResult(ex);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using xCommons.Helpers;
|
|||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using xDataService.Models;
|
using xDataService.Models;
|
||||||
using xPushService.Helpers;
|
using xPushService.Helpers;
|
||||||
|
using xBotService.Reciever;
|
||||||
using xExceptions.Constants;
|
using xExceptions.Constants;
|
||||||
using xBotService.Constants;
|
using xBotService.Constants;
|
||||||
using xBotService.Providers;
|
using xBotService.Providers;
|
||||||
@@ -23,7 +24,6 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using xBotService.Interfaces.Entities.Dtos;
|
using xBotService.Interfaces.Entities.Dtos;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using ConfigurationNodeNames = xBotService.Constants.ConfigurationNodeNames;
|
using ConfigurationNodeNames = xBotService.Constants.ConfigurationNodeNames;
|
||||||
using xBotService.Reciever;
|
|
||||||
|
|
||||||
namespace xBotService.DI
|
namespace xBotService.DI
|
||||||
{
|
{
|
||||||
|
|||||||
+15
-45
@@ -4,6 +4,8 @@ using xBotService.Constants;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
|
using xBotService.Models.Dtos;
|
||||||
|
using xIdentityModels.Models;
|
||||||
|
|
||||||
namespace xBotService.Interfaces
|
namespace xBotService.Interfaces
|
||||||
{
|
{
|
||||||
@@ -56,57 +58,25 @@ namespace xBotService.Interfaces
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send Verification Code to Requests ...
|
/// Send Verification Code to Requests ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="chatId"></param>
|
/// <param name="botUserId"></param>
|
||||||
/// <param name="code"></param>
|
|
||||||
/// <param name="ttlSeconds"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
// Task<XBotMessageResponse> SendVerificationCode(
|
Task<XBotMessage> SendVerificationCode(
|
||||||
// long chatId,
|
long botUserId,
|
||||||
// string code,
|
CancellationToken cancellationToken = default
|
||||||
// int ttlSeconds,
|
);
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// );
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// an Accept for Exit Loading on Bot ...
|
/// Verify User Subscription ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="callbackQueryId"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="text"></param>
|
/// <param name="userInfo"></param>
|
||||||
/// <param name="showAlert"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
// Task<XBotMessageResponse> AnswerCallbackQuery(
|
Task<XBotMessage> VerifyUser(
|
||||||
// string callbackQueryId,
|
string token,
|
||||||
// string text = null,
|
XUserClaimsInfoDto userInfo = null,
|
||||||
// bool showAlert = false,
|
CancellationToken cancellationToken = default
|
||||||
// CancellationToken cancellationToken = default
|
);
|
||||||
// );
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Remove Inline Keyboard After Click (Optional) ...
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="chatId"></param>
|
|
||||||
/// <param name="messageId"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
// Task<XBotMessageResponse> RemoveInlineKeyboard(
|
|
||||||
// long chatId,
|
|
||||||
// long messageId,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// );
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Set Webhook for Retrieve Messages on Recieved ...
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="webhookUrl"></param>
|
|
||||||
/// <param name="secretToken"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
// Task<bool> SetWebhook(
|
|
||||||
// string webhookUrl,
|
|
||||||
// string secretToken = null,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,17 @@ namespace xBotService.Models.Dtos
|
|||||||
/// <value></value>
|
/// <value></value>
|
||||||
public DateTime? LastVerificationSent { get; set; } = null;
|
public DateTime? LastVerificationSent { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verification Menu Shown or not ...
|
||||||
|
/// </summary>
|
||||||
|
public bool ShownVirificationMenu { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verification Code ...
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
public string VerificationCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verified On ...
|
/// Verified On ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -20,6 +20,17 @@ namespace xBotService.Models.Entities
|
|||||||
/// <value></value>
|
/// <value></value>
|
||||||
public DateTime? LastVerificationSent { get; set; } = null;
|
public DateTime? LastVerificationSent { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verification Menu Shown or not ...
|
||||||
|
/// </summary>
|
||||||
|
public bool ShownVirificationMenu { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verification Code ...
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
public string VerificationCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verified On ...
|
/// Verified On ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ namespace xBotService.Models
|
|||||||
|
|
||||||
[JsonProperty("from",
|
[JsonProperty("from",
|
||||||
NullValueHandling = NullValueHandling.Ignore)]
|
NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public XBotResUser User { get; set; }
|
public XBotResUser From { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message",
|
[JsonProperty("message",
|
||||||
NullValueHandling = NullValueHandling.Ignore)]
|
NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ namespace xBotService.Providers.GraphQL
|
|||||||
Field(x => x.BotUserName);
|
Field(x => x.BotUserName);
|
||||||
Field(x => x.BotLastname);
|
Field(x => x.BotLastname);
|
||||||
Field(x => x.BotFirstname);
|
Field(x => x.BotFirstname);
|
||||||
|
Field(x => x.VerificationCode);
|
||||||
Field(x => x.LastVerificationSent);
|
Field(x => x.LastVerificationSent);
|
||||||
|
Field(x => x.ShownVirificationMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+202
-157
@@ -15,6 +15,9 @@ using xIdentityService.Interfaces;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using xExceptions.Constants;
|
using xExceptions.Constants;
|
||||||
using System;
|
using System;
|
||||||
|
using xBotService.Models.Dtos;
|
||||||
|
using xIdentityService.Security;
|
||||||
|
using xBotService.Interfaces.Dtos;
|
||||||
|
|
||||||
namespace xBotService.Providers
|
namespace xBotService.Providers
|
||||||
{
|
{
|
||||||
@@ -22,22 +25,28 @@ namespace xBotService.Providers
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
private readonly ILogger<XBotProvider> logger;
|
private readonly ILogger<XBotProvider> logger;
|
||||||
|
private readonly IXSecurityProvider securityProvider;
|
||||||
private readonly IXIdentityHttpProvider httpProvider;
|
private readonly IXIdentityHttpProvider httpProvider;
|
||||||
private readonly XValidationProvider validationProvider;
|
private readonly XValidationProvider validationProvider;
|
||||||
private readonly XBotServiceConfiguration configuration;
|
private readonly XBotServiceConfiguration configuration;
|
||||||
|
private readonly IXBotUserServiceProvider botUserServiceProvider;
|
||||||
|
|
||||||
public XBotProvider(
|
public XBotProvider(
|
||||||
ILogger<XBotProvider> logger,
|
ILogger<XBotProvider> logger,
|
||||||
|
IXSecurityProvider securityProvider,
|
||||||
IXIdentityHttpProvider httpProvider,
|
IXIdentityHttpProvider httpProvider,
|
||||||
XValidationProvider validationProvider,
|
XValidationProvider validationProvider,
|
||||||
XBotServiceConfiguration configuration
|
XBotServiceConfiguration configuration,
|
||||||
|
IXBotUserServiceProvider botUserServiceProvider
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.httpProvider = httpProvider;
|
this.httpProvider = httpProvider;
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
|
this.securityProvider = securityProvider;
|
||||||
this.validationProvider = validationProvider;
|
this.validationProvider = validationProvider;
|
||||||
|
this.botUserServiceProvider = botUserServiceProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -248,6 +257,13 @@ namespace xBotService.Providers
|
|||||||
XException.InvalidArgs.Throw();
|
XException.InvalidArgs.Throw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Normalize ...
|
||||||
|
if (label.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
label = XBotMessageIds.XBotRequestVerificationCodeLabel;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Markup for Keyboards ...
|
// Markup for Keyboards ...
|
||||||
var markup = XBotReplyMarkup
|
var markup = XBotReplyMarkup
|
||||||
@@ -284,184 +300,213 @@ namespace xBotService.Providers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send Verification Code to Requests ...
|
/// Send Verification Code to Requests ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="chatId"></param>
|
/// <param name="botUserId"></param>
|
||||||
/// <param name="code"></param>
|
|
||||||
/// <param name="ttlSeconds"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
// public virtual async Task<XBotMessageResponse> SendVerificationCode(
|
public virtual async Task<XBotMessage> SendVerificationCode(
|
||||||
// long chatId,
|
long botUserId,
|
||||||
// string code,
|
CancellationToken cancellationToken = default
|
||||||
// int ttlSeconds,
|
)
|
||||||
// CancellationToken cancellationToken = default
|
{
|
||||||
// )
|
//
|
||||||
// {
|
// Validate ...
|
||||||
// //
|
if (botUserId <= 0)
|
||||||
// // Validate ...
|
{
|
||||||
// if (chatId <= 0 || ttlSeconds < 60 || code.IsNullOrEmpty())
|
XException.InvalidArgs.Throw();
|
||||||
// {
|
}
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var minutes = ttlSeconds / 60;
|
// Check Bot User Exists ...
|
||||||
// var response = await SendMessage(
|
var botUser = await botUserServiceProvider.FindOneAsync(
|
||||||
// chatId: chatId,
|
includeBuilder: null,
|
||||||
// cancellationToken: cancellationToken,
|
ignoreSoftDeleteds: true,
|
||||||
// text: $"✅ کد وریفیکیشن شما:\n\n<code>{code}</code>\n\n⏱ این کد تا {minutes} دقیقه معتبر است."
|
cancellationToken: cancellationToken,
|
||||||
// );
|
predicate: x => x.BotUserId.Equals(botUserId)
|
||||||
|
);
|
||||||
|
if (
|
||||||
|
botUser.IsNullOrDefault() ||
|
||||||
|
botUser.BotUserId <= 0)
|
||||||
|
{
|
||||||
|
XException.InvalidArgs.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return response;
|
// Check User not Verified ...
|
||||||
// }
|
if (botUser.VerifiedOn.HasValue)
|
||||||
|
{
|
||||||
|
XException.NotAllowed.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
var verifiedTime = DateTime.UtcNow;
|
||||||
|
var code = CalculateVerificationCode(
|
||||||
|
user: botUser,
|
||||||
|
verifiedTime: verifiedTime
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
var message = XBotMessageIds.XBotVerificationCodeMessageText
|
||||||
|
.ApplyTemplates(new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ XBotParams.XVerificationTokenParam, code },
|
||||||
|
{ XBotParams.XTTLInMinuteParam, configuration.VerificationCodeTTL.ToString() },
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
var result = await SendMessage(
|
||||||
|
cancellationToken: cancellationToken,
|
||||||
|
requestModel: new XBotSendMessageRequest
|
||||||
|
{
|
||||||
|
Text = message,
|
||||||
|
ChatId = botUser.BotUserId,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (!result.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Update Bot User ...
|
||||||
|
botUser.VerificationCode = code;
|
||||||
|
botUser.LastVerificationSent = verifiedTime;
|
||||||
|
botUser = await botUserServiceProvider.UpdateAsync(
|
||||||
|
item: botUser,
|
||||||
|
id: botUser.Id,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// an Accept for Exit Loading on Bot ...
|
/// Verify User Subscription ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="callbackQueryId"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="text"></param>
|
/// <param name="userInfo"></param>
|
||||||
/// <param name="showAlert"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
// public virtual async Task<XBotMessageResponse> AnswerCallbackQuery(
|
public virtual async Task<XBotMessage> VerifyUser(
|
||||||
// string callbackQueryId,
|
string token,
|
||||||
// string text = null,
|
XUserClaimsInfoDto userInfo = null,
|
||||||
// bool showAlert = false,
|
CancellationToken cancellationToken = default
|
||||||
// CancellationToken cancellationToken = default
|
)
|
||||||
// )
|
{
|
||||||
// {
|
//
|
||||||
// //
|
// Validation ...
|
||||||
// // Validation ...
|
if (!token.IsMD5String() ||
|
||||||
// validationProvider.GroupValidationBuilder()
|
token.IsNullOrEmpty() ||
|
||||||
// .AddNotEmpty(callbackQueryId)
|
userInfo.IsNullOrDefault())
|
||||||
// .ValidateGroup();
|
{
|
||||||
|
XException.InvalidArgs.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var client = GetRestClient();
|
// Detect Verified User ...
|
||||||
// var request = GetRestRequest(
|
var botUser = await botUserServiceProvider.FindOneAsync(
|
||||||
// endpoint: XBotEndpoints.AnswerCallbackQuery,
|
includeBuilder: null,
|
||||||
// @params: new Dictionary<string, string>
|
ignoreSoftDeleteds: true,
|
||||||
// {
|
cancellationToken: cancellationToken,
|
||||||
// { XBotParams.XTokenParam, configuration.Token }
|
predicate: x =>
|
||||||
// }
|
x.LastVerificationSent.HasValue &&
|
||||||
// );
|
x.VerificationCode.Equals(token)
|
||||||
|
);
|
||||||
|
if (botUser.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
XException.NotFound.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
// //
|
//
|
||||||
// request.AddJsonBody(new
|
// Check Verification Code is Valid ...
|
||||||
// {
|
var userCode = CalculateVerificationCode(
|
||||||
// text = text,
|
user: botUser,
|
||||||
// show_alert = showAlert,
|
verifiedTime: botUser.LastVerificationSent.Value
|
||||||
// callback_query_id = callbackQueryId,
|
);
|
||||||
// });
|
if (!token.Equals(userCode))
|
||||||
|
{
|
||||||
|
XException.NotAllowed.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var response = await httpProvider.RunRestRequest<XBotMessageResponse>(
|
// Validate Toke Life Time ...
|
||||||
// client: client,
|
var isExpired = botUser.LastVerificationSent.Value
|
||||||
// request: request,
|
.IsExpiredTTL(configuration.VerificationCodeTTL * 60);
|
||||||
// method: XHttpMethod.POST,
|
if (isExpired)
|
||||||
// cancellationToken: cancellationToken
|
{
|
||||||
// );
|
//
|
||||||
|
// Cleanup User Verification Info ...
|
||||||
|
botUser.VerificationCode = null;
|
||||||
|
botUser.LastVerificationSent = null;
|
||||||
|
botUser.ShownVirificationMenu = false;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return response;
|
botUser = await botUserServiceProvider.UpdateAsync(
|
||||||
// }
|
item: botUser,
|
||||||
|
id: botUser.Id,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
/// <summary>
|
//
|
||||||
/// Remove Inline Keyboard After Click (Optional) ...
|
XException.ExpiredDate.Throw();
|
||||||
/// </summary>
|
}
|
||||||
/// <param name="chatId"></param>
|
|
||||||
/// <param name="messageId"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
// public virtual async Task<XBotMessageResponse> RemoveInlineKeyboard(
|
|
||||||
// long chatId,
|
|
||||||
// long messageId,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Validation ...
|
|
||||||
// if (chatId <= 0 || messageId <= 0)
|
|
||||||
// {
|
|
||||||
// XException.InvalidArgs.Throw();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var client = GetRestClient();
|
// Make User Valid ...
|
||||||
// var request = GetRestRequest(
|
botUser.VerificationCode = null;
|
||||||
// endpoint: XBotEndpoints.EditMessageReplyMarkup,
|
botUser.UserId = userInfo.UserId;
|
||||||
// @params: new Dictionary<string, string>
|
botUser.LastVerificationSent = null;
|
||||||
// {
|
botUser.VerifiedOn = DateTime.UtcNow;
|
||||||
// { XBotParams.XTokenParam, configuration.Token }
|
botUser.ShownVirificationMenu = false;
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// request.AddJsonBody(new
|
botUser = await botUserServiceProvider.UpdateAsync(
|
||||||
// {
|
item: botUser,
|
||||||
// chat_id = chatId,
|
id: botUser.Id,
|
||||||
// message_id = messageId,
|
saveChanges: true,
|
||||||
// reply_markup = new { inline_keyboard = new List<List<object>>() }
|
connectionId: null,
|
||||||
// });
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
// //
|
//
|
||||||
// var response = await httpProvider.RunRestRequest<XBotMessageResponse>(
|
// Send User Verification Message ...
|
||||||
// client: client,
|
var result = await SendMessage(
|
||||||
// request: request,
|
cancellationToken: cancellationToken,
|
||||||
// method: XHttpMethod.POST,
|
requestModel: new XBotSendMessageRequest
|
||||||
// cancellationToken: cancellationToken
|
{
|
||||||
// );
|
ChatId = botUser.BotUserId,
|
||||||
|
Text = XBotMessageIds.XBotUserVerificationSucceedMessageText
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// //
|
//
|
||||||
// return response;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Set Webhook for Retrieve Messages on Recieved ...
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="webhookUrl"></param>
|
|
||||||
/// <param name="secretToken"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
// public virtual async Task<bool> SetWebhook(
|
|
||||||
// string webhookUrl,
|
|
||||||
// string secretToken = null,
|
|
||||||
// CancellationToken cancellationToken = default
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// var client = GetRestClient();
|
|
||||||
// var request = GetRestRequest(
|
|
||||||
// endpoint: XBotEndpoints.SetWebhook,
|
|
||||||
// @params: new Dictionary<string, string>
|
|
||||||
// {
|
|
||||||
// { XBotParams.XTokenParam, configuration.Token }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// request.AddJsonBody(new
|
|
||||||
// {
|
|
||||||
// url = webhookUrl,
|
|
||||||
// secret_token = secretToken
|
|
||||||
// });
|
|
||||||
|
|
||||||
// //
|
|
||||||
// var iResponse = await httpProvider.RunRestRequest<XBotMessageResponse>(
|
|
||||||
// client: client,
|
|
||||||
// request: request,
|
|
||||||
// method: XHttpMethod.POST,
|
|
||||||
// cancellationToken: cancellationToken
|
|
||||||
// );
|
|
||||||
// var response = iResponse?.Ok ?? false;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// return response;
|
|
||||||
// }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//
|
//
|
||||||
#region Private ...
|
#region Private ...
|
||||||
|
/// <summary>
|
||||||
|
/// Calculate Verification Code ...
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
|
/// <param name="verifiedTime"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string CalculateVerificationCode(
|
||||||
|
XBotUserDto user,
|
||||||
|
DateTime verifiedTime
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
var result = securityProvider
|
||||||
|
.Encrypt($"{user.BotUserId}{verifiedTime}")
|
||||||
|
.ToMd5String();
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,10 @@ using Microsoft.Extensions.Logging;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using xBotService.Constants;
|
using xBotService.Constants;
|
||||||
using xBotService.Extensions;
|
using xBotService.Extensions;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
using UglyToad.PdfPig.Graphics.Operations.PathConstruction;
|
||||||
|
using xBotService.Models.Entities;
|
||||||
|
using xExceptions.Constants;
|
||||||
|
|
||||||
namespace xBotService.Reciever
|
namespace xBotService.Reciever
|
||||||
{
|
{
|
||||||
@@ -87,13 +91,59 @@ namespace xBotService.Reciever
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Check Item Exists in Db ...
|
// Check Item Exists in Db ...
|
||||||
|
Expression<Func<XBotUser, bool>> predicator = null;
|
||||||
|
if (!update.Message.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
predicator = x => x.BotUserId.Equals(update.Message.From.Id);
|
||||||
|
}
|
||||||
|
else if (!update.CallbackQuery.IsNullOrDefault() &&
|
||||||
|
!update.CallbackQuery.From.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
predicator = x => x.BotUserId.Equals(update.CallbackQuery.From.Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XException.NotFound.Throw();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
var item = await botUserProvider.FindOneAsync(
|
var item = await botUserProvider.FindOneAsync(
|
||||||
predicate: x => x.BotUserId.Equals(update.Message.From.Id)
|
predicate: predicator,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
);
|
);
|
||||||
if (item.IsNullOrDefault())
|
if (item.IsNullOrDefault())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Not Exists ...
|
// Not Exists ...
|
||||||
|
var itemForAdd = new XBotUserDto();
|
||||||
|
if (!update.Message.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
itemForAdd = new XBotUserDto
|
||||||
|
{
|
||||||
|
BotUserId = update.Message.From.Id,
|
||||||
|
BotUserName = update.Message.From.Username,
|
||||||
|
BotLastname = update.Message.From.LastName,
|
||||||
|
BotFirstname = update.Message.From.FirstName,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (!update.CallbackQuery.IsNullOrDefault() &&
|
||||||
|
!update.CallbackQuery.From.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
itemForAdd = new XBotUserDto
|
||||||
|
{
|
||||||
|
BotUserId = update.CallbackQuery.From.Id,
|
||||||
|
BotUserName = update.CallbackQuery.From.Username,
|
||||||
|
BotLastname = update.CallbackQuery.From.LastName,
|
||||||
|
BotFirstname = update.CallbackQuery.From.FirstName,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!itemForAdd.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
//
|
||||||
item = await botUserProvider.AddAsync(
|
item = await botUserProvider.AddAsync(
|
||||||
saveChanges: true,
|
saveChanges: true,
|
||||||
connectionId: null,
|
connectionId: null,
|
||||||
@@ -110,6 +160,7 @@ namespace xBotService.Reciever
|
|||||||
//
|
//
|
||||||
logger.LogInformation("Add new BotUser ...");
|
logger.LogInformation("Add new BotUser ...");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -128,7 +179,7 @@ namespace xBotService.Reciever
|
|||||||
|
|
||||||
//
|
//
|
||||||
// TODO: Remove this ...
|
// TODO: Remove this ...
|
||||||
if (item.BotUserName != "llhajamir")
|
if (item.BotUserName != "saherelm_it_center")
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -138,24 +189,56 @@ namespace xBotService.Reciever
|
|||||||
if (!update.CallbackQuery.IsNullOrDefault())
|
if (!update.CallbackQuery.IsNullOrDefault())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
await HandleBotAction(
|
||||||
|
botUser: item,
|
||||||
|
update: update,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to Show Verification Menu on User ...
|
// Try to Show Verification Menu on User ...
|
||||||
|
if (!item.ShownVirificationMenu)
|
||||||
|
{
|
||||||
|
//
|
||||||
logger
|
logger
|
||||||
.LogInformation($"Show Verification Request Method to User: {item.User.GetFullname()}");
|
.LogInformation($"Show Verification Request Method to User: {item.User.GetFullname()}");
|
||||||
var response = await botProvider.ShowVerificationMenu(
|
var response = await botProvider.ShowVerificationMenu(
|
||||||
botUserId: item.BotUserId,
|
botUserId: item.BotUserId,
|
||||||
cancellationToken: cancellationToken
|
cancellationToken: cancellationToken
|
||||||
);
|
);
|
||||||
|
if (!response.IsNullOrDefault())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
item.ShownVirificationMenu = true;
|
||||||
|
item = await botUserProvider.UpdateAsync(
|
||||||
|
item: item,
|
||||||
|
id: item.Id,
|
||||||
|
saveChanges: true,
|
||||||
|
connectionId: null,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
logger.LogInformation($"Verification Menu Shown for User: {item.BotUserId}");
|
logger.LogInformation($"Verification Menu Shown for User: {item.BotUserId}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task HandleBotAction(XBotUpdateResponse update)
|
/// <summary>
|
||||||
|
/// Handle Bot Sent Commands ...
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="update"></param>
|
||||||
|
/// <param name="botUser"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task HandleBotAction(
|
||||||
|
XBotUpdateResponse update,
|
||||||
|
XBotUserDto botUser,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Validate ...
|
// Validate ...
|
||||||
@@ -166,6 +249,12 @@ namespace xBotService.Reciever
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Inject Provider ...
|
||||||
|
using var scope = serviceProvider.CreateScope();
|
||||||
|
var botProvider = scope.ServiceProvider.GetRequiredService<IXBotProvider>();
|
||||||
|
var botUserProvider = scope.ServiceProvider.GetRequiredService<IXBotUserServiceProvider>();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Switch Betwen Data ...
|
// Switch Betwen Data ...
|
||||||
switch (update.CallbackQuery.Data)
|
switch (update.CallbackQuery.Data)
|
||||||
@@ -176,6 +265,10 @@ namespace xBotService.Reciever
|
|||||||
//
|
//
|
||||||
// Remove Inline Keyboard ...
|
// Remove Inline Keyboard ...
|
||||||
// And Send Verification ...
|
// And Send Verification ...
|
||||||
|
await botProvider.SendVerificationCode(
|
||||||
|
botUserId: botUser.BotUserId,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user