Allow empty SelfId

This commit is contained in:
hchen 2023-10-25 10:55:12 -05:00
parent 4c54a62557
commit a36f3e4b6c

View file

@ -21,7 +21,7 @@ public partial class InstructService : IInstructService
var hooks = _services.GetServices<IInstructHook>();
foreach (var hook in hooks)
{
if (hook.SelfId != agent.Id)
if (!string.IsNullOrEmpty(hook.SelfId) && hook.SelfId != agent.Id)
{
continue;
}
@ -47,7 +47,7 @@ public partial class InstructService : IInstructService
foreach (var hook in hooks)
{
if (hook.SelfId != agent.Id)
if (!string.IsNullOrEmpty(hook.SelfId) && hook.SelfId != agent.Id)
{
continue;
}