Cleaned up old references to User.UpdateActivity
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user