diff --git a/my/fbmessenger/common.py b/my/fbmessenger/common.py index 1f82327..a498952 100644 --- a/my/fbmessenger/common.py +++ b/my/fbmessenger/common.py @@ -10,8 +10,16 @@ class Thread(Protocol): @property def id(self) -> str: ... - # todo hmm it doesn't like it because one from .export is just str, not Optional... - # name: Optional[str] + @property + def name(self) -> Optional[str]: ... + + +class Sender(Protocol): + @property + def id(self) -> str: ... + + @property + def name(self) -> Optional[str]: ... class Message(Protocol): @@ -27,6 +35,9 @@ class Message(Protocol): @property def thread(self) -> Thread: ... + @property + def sender(self) -> Sender: ... + from itertools import chain from more_itertools import unique_everseen