Skip to content

Commit

Permalink
fix conflict (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogdie233 authored Oct 21, 2024
1 parent d015386 commit bff0f20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public async Task<List<BotGroup>> GetCachedGroups(bool refreshCache, Cancellatio
return _uinToUid.GetValueOrDefault(friendUin);
}

public async Task<uint?> ResolveUin(uint? groupUin, string friendUid, bool force, CancellationToken cancellationToken)
public async Task<uint?> ResolveUin(uint? groupUin, string friendUid, bool force = false, CancellationToken cancellationToken = default)
{
if (_uinToUid.Count == 0) await ResolveFriendsUidAndFriendGroups(cancellationToken);
if (groupUin == null) return _uinToUid.FirstOrDefault(x => x.Value == friendUid).Key;
Expand All @@ -85,7 +85,7 @@ public async Task<List<BotGroup>> GetCachedGroups(bool refreshCache, Cancellatio
return _uinToUid.FirstOrDefault(x => x.Value == friendUid).Key;
}

public async Task<List<BotGroupMember>> GetCachedMembers(uint groupUin, bool refreshCache, CancellationToken cancellationToken)
public async Task<List<BotGroupMember>> GetCachedMembers(uint groupUin, bool refreshCache, CancellationToken cancellationToken = default)
{
if (!_cachedGroupMembers.TryGetValue(groupUin, out var members) || refreshCache)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public override async Task Incoming(ProtocolEvent e, CancellationToken cancellat
}
case GroupSysTodoEvent todo:
{
uint uin = await Collection.Business.CachingLogic.ResolveUin(todo.GroupUin, todo.OperatorUid) ?? 0;
uint uin = await Collection.Business.CachingLogic.ResolveUin(todo.GroupUin, todo.OperatorUid, false, cancellationToken) ?? 0;

Collection.Invoker.PostEvent(new GroupTodoEvent(todo.GroupUin, uin));
break;
Expand Down

0 comments on commit bff0f20

Please sign in to comment.