Past events loading (with two bugs)

This commit is contained in:
miruka
2019-07-05 02:45:30 -04:00
parent 83694d387b
commit ecba7c47ec
5 changed files with 83 additions and 29 deletions

View File

@@ -2,7 +2,7 @@ import asyncio
import json
import random
from pathlib import Path
from typing import Dict, Optional, Tuple
from typing import Dict, Optional, Set, Tuple
from atomicfile import AtomicFile
@@ -18,8 +18,12 @@ CONFIG_LOCK = asyncio.Lock()
class Backend:
def __init__(self, app: App) -> None:
self.app = app
self.clients: Dict[str, MatrixClient] = {}
self.past_tokens: Dict[str, str] = {} # {room_id: token}
self.fully_loaded_rooms: Set[str] = set() # {room_id}
def __repr__(self) -> str:
return f"{type(self).__name__}(clients={self.clients!r})"