Skip to content

Commit be958be

Browse files
authored
Merge pull request #367 from hchen2020/master
Not trigger if replyMessage.FunctionName is empty.
2 parents de2f4ee + 280330b commit be958be

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Infrastructure/BotSharp.Abstraction/Conversations/Models/RoleDialogModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public class RoleDialogModel : ITrackableMessage
4848
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
4949
public string ImageUrl { get; set; }
5050

51+
/// <summary>
52+
/// Remember to set Message.Content as well
53+
/// </summary>
5154
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
5255
public RichContent<IRichMessage>? RichContent { get; set; }
5356

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public async Task<bool> SendMessage(string agentId,
5353
hook.SetAgent(agent)
5454
.SetConversation(conversation);
5555

56-
if (replyMessage == null)
56+
if (replyMessage == null || string.IsNullOrEmpty(replyMessage.FunctionName))
5757
{
5858
await hook.OnMessageReceived(message);
5959
}

0 commit comments

Comments
 (0)