Remove the unneeded full tracking of history

Also use setdefault() to save a bunch of pain
Prevent a silly exhaustive history search on all channel times rather than just current users
This commit is contained in:
Marc Di Luzio 2024-08-13 00:12:30 +01:00
parent 503e899f19
commit f00216fffc
3 changed files with 40 additions and 68 deletions

View file

@ -105,7 +105,7 @@ class _Config():
@property
def score_factors(self) -> _ScoreFactors:
return _ScoreFactors(self._dict.get(_Key.SCORE_FACTORS, {}))
return _ScoreFactors(self._dict.setdefault(_Key.SCORE_FACTORS, {}))
def _migrate(dict: dict):