Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Libraries/Microsoft.Teams.Apps/AppEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ protected async Task OnErrorEvent(IPlugin sender, ErrorEvent @event, Cancellatio
}
}

foreach (var plugin in Plugins)
foreach (var plugin in Plugins.Where(p => !ReferenceEquals(sender, p)))
{
if (sender.Equals(plugin)) continue;
await plugin.OnError(this, sender, @event, cancellationToken);
}
}
Expand All @@ -44,9 +43,8 @@ protected async Task OnActivitySentEvent(ISenderPlugin sender, ActivitySentEvent
{
Logger.Debug(EventType.ActivitySent);

foreach (var plugin in Plugins)
foreach (var plugin in Plugins.Where(p => !ReferenceEquals(sender, p)))
{
if (sender.Equals(plugin)) continue;
await plugin.OnActivitySent(this, sender, @event, cancellationToken);
}
}
Expand All @@ -55,9 +53,8 @@ protected async Task OnActivityResponseEvent(ISenderPlugin sender, ActivityRespo
{
Logger.Debug(EventType.ActivityResponse);

foreach (var plugin in Plugins)
foreach (var plugin in Plugins.Where(p => !ReferenceEquals(sender, p)))
{
if (sender.Equals(plugin)) continue;
await plugin.OnActivityResponse(this, sender, @event, cancellationToken);
}
}
Expand Down
Loading