Skip to content

Commit

Permalink
Adjust PostPartySearch to send all botted maps and districts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Aug 14, 2024
1 parent ecb89ad commit b72df6d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions GuildWarsPartySearch/Endpoints/PostPartySearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ public override async Task ExecuteAsync(PostPartySearchRequest? message, Cancell
var faultyResponse = await Success;
if (message.GetFullList)
{
var party_searches = await this.partySearchService.GetAllPartySearches(cancellationToken);
faultyResponse.PartySearches = FilterResults(party_searches, currentBot, allBots);

faultyResponse.PartySearches = allBots.Where(b => b.Id != currentBot?.Id).Select(b => new PartySearch
{
Map = b.Map,
District = b.District
}).ToList();
}

await this.SendMessage(faultyResponse, cancellationToken);
Expand All @@ -118,8 +120,11 @@ await this.liveFeedService.PushUpdate(new PartySearch
var response = await Success;
if (parsedResult?.GetFullList is true)
{
var party_searches = await this.partySearchService.GetAllPartySearches(cancellationToken);
response.PartySearches = FilterResults(party_searches, currentBot, allBots);
response.PartySearches = allBots.Where(b => b.Id != currentBot?.Id).Select(b => new PartySearch
{
Map = b.Map,
District = b.District
}).ToList();
}
return response;
},
Expand Down

0 comments on commit b72df6d

Please sign in to comment.