mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-10-02 01:18:27 -04:00
Add endpoints for backfilling history (MSC2716) (#9247)
Work on https://github.com/matrix-org/matrix-doc/pull/2716
This commit is contained in:
parent
756fd513df
commit
96f6293de5
14 changed files with 584 additions and 23 deletions
|
@ -119,6 +119,7 @@ class _EventInternalMetadata:
|
|||
redacted = DictProperty("redacted") # type: bool
|
||||
txn_id = DictProperty("txn_id") # type: str
|
||||
token_id = DictProperty("token_id") # type: str
|
||||
historical = DictProperty("historical") # type: bool
|
||||
|
||||
# XXX: These are set by StreamWorkerStore._set_before_and_after.
|
||||
# I'm pretty sure that these are never persisted to the database, so shouldn't
|
||||
|
@ -204,6 +205,14 @@ class _EventInternalMetadata:
|
|||
"""
|
||||
return self._dict.get("redacted", False)
|
||||
|
||||
def is_historical(self) -> bool:
|
||||
"""Whether this is a historical message.
|
||||
This is used by the batchsend historical message endpoint and
|
||||
is needed to and mark the event as backfilled and skip some checks
|
||||
like push notifications.
|
||||
"""
|
||||
return self._dict.get("historical", False)
|
||||
|
||||
|
||||
class EventBase(metaclass=abc.ABCMeta):
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue