@@ -447,13 +447,14 @@ namespace Discord | |||||
msg.Update(x); | msg.Update(x); | ||||
if (Config.TrackActivity) | if (Config.TrackActivity) | ||||
{ | { | ||||
if (channel.IsPrivate) | |||||
/*if (channel.IsPrivate) | |||||
{ | { | ||||
var user = msg.User; | var user = msg.User; | ||||
if (user != null) | if (user != null) | ||||
user.UpdateActivity(msg.EditedTimestamp ?? msg.Timestamp); | user.UpdateActivity(msg.EditedTimestamp ?? msg.Timestamp); | ||||
} | } | ||||
else | |||||
else*/ | |||||
if (!channel.IsPrivate) | |||||
{ | { | ||||
var member = msg.Member; | var member = msg.Member; | ||||
if (member != null) | if (member != null) | ||||
@@ -583,13 +583,14 @@ namespace Discord | |||||
if (Config.TrackActivity) | if (Config.TrackActivity) | ||||
{ | { | ||||
var channel = msg.Channel; | var channel = msg.Channel; | ||||
if (channel == null || channel.IsPrivate) | |||||
/*if (channel == null || channel.IsPrivate) | |||||
{ | { | ||||
var user = msg.User; | var user = msg.User; | ||||
if (user != null) | if (user != null) | ||||
user.UpdateActivity(data.Timestamp); | user.UpdateActivity(data.Timestamp); | ||||
} | } | ||||
else | |||||
else*/ | |||||
if (channel?.IsPrivate == false) | |||||
{ | { | ||||
var member = msg.Member; | var member = msg.Member; | ||||
if (member != null) | if (member != null) | ||||
@@ -664,12 +665,13 @@ namespace Discord | |||||
} | } | ||||
if (Config.TrackActivity) | if (Config.TrackActivity) | ||||
{ | { | ||||
if (channel.IsPrivate) | |||||
/*if (channel.IsPrivate) | |||||
{ | { | ||||
if (user != null) | if (user != null) | ||||
user.UpdateActivity(); | user.UpdateActivity(); | ||||
} | } | ||||
else | |||||
else*/ | |||||
if (!channel.IsPrivate) | |||||
{ | { | ||||
var member = _members[data.UserId, channel.ServerId]; | var member = _members[data.UserId, channel.ServerId]; | ||||
if (member != null) | if (member != null) | ||||
@@ -13,7 +13,7 @@ namespace Discord | |||||
private readonly DiscordClient _client; | private readonly DiscordClient _client; | ||||
private readonly ConcurrentDictionary<string, bool> _servers; | private readonly ConcurrentDictionary<string, bool> _servers; | ||||
private int _refCount; | private int _refCount; | ||||
private DateTime? _lastPrivateActivity; | |||||
//private DateTime? _lastPrivateActivity; | |||||
/// <summary> Returns the unique identifier for this user. </summary> | /// <summary> Returns the unique identifier for this user. </summary> | ||||
public string Id { get; } | public string Id { get; } | ||||
@@ -100,11 +100,11 @@ namespace Discord | |||||
if (model.IsVerified != null) | if (model.IsVerified != null) | ||||
IsVerified = model.IsVerified; | IsVerified = model.IsVerified; | ||||
} | } | ||||
internal void UpdateActivity(DateTime? activity = null) | |||||
/*internal void UpdateActivity(DateTime? activity = null) | |||||
{ | { | ||||
if (_lastPrivateActivity == null || activity > _lastPrivateActivity.Value) | if (_lastPrivateActivity == null || activity > _lastPrivateActivity.Value) | ||||
_lastPrivateActivity = activity ?? DateTime.UtcNow; | _lastPrivateActivity = activity ?? DateTime.UtcNow; | ||||
} | |||||
}*/ | |||||
public override string ToString() => Name; | public override string ToString() => Name; | ||||