2023-11-22 16:27:55 +00:00
|
|
|
using Microsoft.AspNetCore.SignalR;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Plugin.ChatHub.Controllers;
|
|
|
|
|
|
|
|
|
|
[Authorize]
|
|
|
|
|
[ApiController]
|
2023-12-27 15:53:54 +00:00
|
|
|
public class ChatHubController : ControllerBase
|
2023-11-22 16:27:55 +00:00
|
|
|
{
|
|
|
|
|
private readonly IServiceProvider _services;
|
|
|
|
|
private readonly ILogger _logger;
|
|
|
|
|
private readonly IHubContext<SignalRHub> _chatHub;
|
|
|
|
|
private readonly IUserIdentity _user;
|
|
|
|
|
|
|
|
|
|
public ChatHubController(IServiceProvider services,
|
|
|
|
|
ILogger<ChatHubController> logger,
|
|
|
|
|
IHubContext<SignalRHub> chatHub,
|
|
|
|
|
IUserIdentity user)
|
|
|
|
|
{
|
|
|
|
|
_services = services;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
_chatHub = chatHub;
|
|
|
|
|
_user = user;
|
|
|
|
|
}
|
|
|
|
|
}
|