Ability to notify mods when user left or deleted message

This commit is contained in:
Runebaas 2017-09-30 17:26:24 +02:00
parent 5771fcddba
commit 8d08b87d09
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
4 changed files with 166 additions and 9 deletions

View file

@ -40,9 +40,15 @@ namespace Geekbot.net.Lib
public UserRepositoryUser Get(ulong userId)
{
var user = _redis.HashGetAll($"Users:{userId}").ToDictionary();
var user = _redis.HashGetAll($"Users:{userId}");
for (int i = 1; i < 6; i++)
{
if (user.Length != 0) break;
user = _redis.HashGetAll($"Users:{userId + (ulong)i}");
}
var dto = new UserRepositoryUser();
foreach (var a in user)
foreach (var a in user.ToDictionary())
{
switch (a.Key)
{