Give private users a proper ID.
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Discord
|
||||
public Members(DiscordClient client, object writerLock)
|
||||
: base(client, writerLock, x => x.OnCached(), x => x.OnUncached()) { }
|
||||
private string GetKey(string userId, string serverId)
|
||||
=> serverId + '_' + userId;
|
||||
=> (serverId ?? "Private") + '_' + userId;
|
||||
|
||||
public User this[string userId, string serverId]
|
||||
=> this[GetKey(userId, serverId)];
|
||||
|
||||
@@ -549,7 +549,7 @@ namespace Discord
|
||||
var channel = _channels[data.ChannelId];
|
||||
if (channel != null)
|
||||
{
|
||||
var user = _members[data.UserId, channel.Server.Id];
|
||||
var user = _members[data.UserId, channel.Server?.Id];
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user