Begin updating the way updates are built

This commit is contained in:
Lonami Exo
2022-02-15 11:57:55 +01:00
parent c914a92dcf
commit 483e2aadf1
18 changed files with 337 additions and 284 deletions

View File

@@ -34,15 +34,12 @@ class StopPropagation(Exception):
class EventBuilder(abc.ABC):
@classmethod
@abc.abstractmethod
def _build(cls, update, others, self_id, entities, client):
def _build(cls, client, update, entities):
"""
Builds an event for the given update if possible, or returns None.
`others` are the rest of updates that came in the same container
as the current `update`.
`self_id` should be the current user's ID, since it is required
for some events which lack this information but still need it.
`entities` must have `get(Peer) -> User|Chat` and `self_id`,
which must be the current user's ID.
"""