Cleaned up old references to User.UpdateActivity

This commit is contained in:
Brandon Smith
2015-10-19 09:14:38 -03:00
parent 3f14650a28
commit 104aef128d
3 changed files with 12 additions and 9 deletions

View File

@@ -447,13 +447,14 @@ namespace Discord
msg.Update(x);
if (Config.TrackActivity)
{
if (channel.IsPrivate)
/*if (channel.IsPrivate)
{
var user = msg.User;
if (user != null)
user.UpdateActivity(msg.EditedTimestamp ?? msg.Timestamp);
}
else
else*/
if (!channel.IsPrivate)
{
var member = msg.Member;
if (member != null)

View File

@@ -583,13 +583,14 @@ namespace Discord
if (Config.TrackActivity)
{
var channel = msg.Channel;
if (channel == null || channel.IsPrivate)
/*if (channel == null || channel.IsPrivate)
{
var user = msg.User;
if (user != null)
user.UpdateActivity(data.Timestamp);
}
else
else*/
if (channel?.IsPrivate == false)
{
var member = msg.Member;
if (member != null)
@@ -664,12 +665,13 @@ namespace Discord
}
if (Config.TrackActivity)
{
if (channel.IsPrivate)
/*if (channel.IsPrivate)
{
if (user != null)
user.UpdateActivity();
}
else
else*/
if (!channel.IsPrivate)
{
var member = _members[data.UserId, channel.ServerId];
if (member != null)

View File

@@ -13,7 +13,7 @@ namespace Discord
private readonly DiscordClient _client;
private readonly ConcurrentDictionary<string, bool> _servers;
private int _refCount;
private DateTime? _lastPrivateActivity;
//private DateTime? _lastPrivateActivity;
/// <summary> Returns the unique identifier for this user. </summary>
public string Id { get; }
@@ -100,11 +100,11 @@ namespace Discord
if (model.IsVerified != null)
IsVerified = model.IsVerified;
}
internal void UpdateActivity(DateTime? activity = null)
/*internal void UpdateActivity(DateTime? activity = null)
{
if (_lastPrivateActivity == null || activity > _lastPrivateActivity.Value)
_lastPrivateActivity = activity ?? DateTime.UtcNow;
}
}*/
public override string ToString() => Name;