public RegStatus UserIsConnected(Guid userId, int tenantId) { if (CachedTelegramDao.GetUser(userId, tenantId) != null) { return(RegStatus.Registered); } return(IsAwaitingRegistration(userId, tenantId) ? RegStatus.AwaitingConfirmation : RegStatus.NotRegistered); }
public UserCommands(IOptionsSnapshot <CachedTelegramDao> cachedTelegramDao) { CachedTelegramDao = cachedTelegramDao.Value; }
public void Disconnect(Guid userId, int tenantId) { CachedTelegramDao.Delete(userId, tenantId); }