Update Group.cs

corrects RoleDataAge value to not be -1 if we have data and its less than 120 secs old
This commit is contained in:
Madpeterz 2021-02-07 20:10:36 +00:00
parent 240ba3decf
commit b6ada34ed5

View file

@ -100,10 +100,10 @@ namespace BetterSecondBot.HttpService
else
{
long dif = helpers.UnixTimeNow() - bot.MyGroupRolesStorage[groupuuid].Key;
if(dif >= 120)
reply.RoleDataAge = dif;
if (dif >= 120)
{
reply.UpdateUnderway = true;
reply.RoleDataAge = dif;
}
foreach(GroupRole gr in bot.MyGroupRolesStorage[groupuuid].Value)
{