BotSharp/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.TruncateMessage.cs

14 lines
452 B
C#
Raw Normal View History

2024-01-29 01:33:40 +00:00
using BotSharp.Abstraction.Repositories;
namespace BotSharp.Core.Conversations.Services;
public partial class ConversationService : IConversationService
{
public async Task<bool> TruncateConversation(string conversationId, string messageId)
{
var db = _services.GetRequiredService<IBotSharpRepository>();
var isSaved = db.TruncateConversation(conversationId, messageId);
return await Task.FromResult(isSaved);
}
}