Complete customer communication system with automatic message delivery working correctly

This commit is contained in:
sysadmin
2025-08-27 18:51:19 +01:00
parent eae5be3e7c
commit 3f4789730c
4 changed files with 90 additions and 0 deletions

View File

@@ -90,6 +90,7 @@ public class MessagesController : ControllerBase
}
[HttpGet("pending")]
[AllowAnonymous] // Allow bots to access without authentication
public async Task<ActionResult<IEnumerable<CustomerMessageDto>>> GetPendingMessages([FromQuery] string platform = "Telegram")
{
var messages = await _messageService.GetPendingMessagesAsync(platform);
@@ -97,6 +98,7 @@ public class MessagesController : ControllerBase
}
[HttpPost("{id}/mark-sent")]
[AllowAnonymous] // Allow bots to access without authentication
public async Task<ActionResult> MarkMessageAsSent(Guid id, [FromQuery] string? platformMessageId = null)
{
var success = await _messageService.MarkMessageAsSentAsync(id, platformMessageId);
@@ -121,6 +123,7 @@ public class MessagesController : ControllerBase
}
[HttpPost("{id}/mark-failed")]
[AllowAnonymous] // Allow bots to access without authentication
public async Task<ActionResult> MarkMessageAsFailed(Guid id, [FromBody] string reason)
{
var success = await _messageService.MarkMessageAsFailedAsync(id, reason);