Complete customer communication system with automatic message delivery working correctly
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user