Skip to content

Commit

Permalink
Merge branch 'LagrangeDev:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sisi0318 authored Jul 12, 2024
2 parents d53610b + f219082 commit 969ae13
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Lagrange.OneBot/Core/Operation/Info/GetGroupInfoOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ public async Task<OneBotResult> HandleOperation(BotContext context, JsonNode? pa
{
var result = (await context.FetchGroups(message.NoCache)).FirstOrDefault(x => x.GroupUin == message.GroupId);

return result == null
? new OneBotResult(null, -1, "failed")
if (result == null && !message.NoCache)
{
result = (await context.FetchGroups(true)).FirstOrDefault(x => x.GroupUin == message.GroupId);
}

return result == null
? new OneBotResult(null, -1, "failed")
: new OneBotResult(new OneBotGroup(result), 0, "ok");
}

Expand Down

0 comments on commit 969ae13

Please sign in to comment.