Merge pull request #210 from iceljc/features/sync-conversation-status

sync conversation status
This commit is contained in:
Haiping 2023-11-15 10:51:32 -06:00 committed by GitHub
commit 359d1bfe5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,7 @@ public class ConversationCollection : MongoBase
public string AgentId { get; set; }
public string UserId { get; set; }
public string Title { get; set; }
public string Status { get; set; }
public List<StateKeyValue> States { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }

View file

@ -610,6 +610,7 @@ public class MongoRepository : IBotSharpRepository
AgentId = conversation.AgentId,
UserId = !string.IsNullOrEmpty(conversation.UserId) ? conversation.UserId : string.Empty,
Title = conversation.Title,
Status = conversation.Status,
States = conversation.States?.ToKeyValueList() ?? new List<StateKeyValue>(),
CreatedTime = DateTime.UtcNow,
UpdatedTime = DateTime.UtcNow,
@ -700,6 +701,7 @@ public class MongoRepository : IBotSharpRepository
AgentId = conv.AgentId.ToString(),
UserId = conv.UserId.ToString(),
Title = conv.Title,
Status = conv.Status,
Dialog = dialog?.Dialog ?? string.Empty,
States = new ConversationState(conv.States ?? new List<StateKeyValue>()),
CreatedTime = conv.CreatedTime,
@ -724,6 +726,7 @@ public class MongoRepository : IBotSharpRepository
AgentId = conv.AgentId.ToString(),
UserId = conv.UserId.ToString(),
Title = conv.Title,
Status = conv.Status,
CreatedTime = conv.CreatedTime,
UpdatedTime = conv.UpdatedTime
});
@ -745,6 +748,7 @@ public class MongoRepository : IBotSharpRepository
AgentId = c.AgentId.ToString(),
UserId = c.UserId.ToString(),
Title = c.Title,
Status = c.Status,
CreatedTime = c.CreatedTime,
UpdatedTime = c.UpdatedTime
}).ToList();