Browse Source

Added perf TODO

tags/1.0-rc
RogueException 9 years ago
parent
commit
4b64807465
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/Discord.Net/Entities/WebSocket/CachedTextChannel.cs

+ 1
- 0
src/Discord.Net/Entities/WebSocket/CachedTextChannel.cs View File

@@ -29,6 +29,7 @@ namespace Discord
=> Task.FromResult<IReadOnlyCollection<IGuildUser>>(Members.Skip(offset).Take(limit).ToImmutableArray());
public CachedGuildUser GetUser(ulong id)
{
//TODO: It's slow to do a perms check here... Maybe only do it on external calls?
var user = Guild.GetUser(id);
if (user != null && Permissions.GetValue(Permissions.ResolveChannel(user, this, user.GuildPermissions.RawValue), ChannelPermission.ReadMessages))
return user;


Loading…
Cancel
Save