0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-19 08:24:25 +01:00

Use is_outlier() so that we don't get AttributeError

This commit is contained in:
Erik Johnston 2014-12-16 18:33:50 +00:00
parent 5b39cfff69
commit 52f99243ab
3 changed files with 5 additions and 7 deletions

View file

@ -562,8 +562,8 @@ class ReplicationLayer(object):
already_seen = ( already_seen = (
existing and ( existing and (
not existing.internal_metadata.outlier not existing.internal_metadata.is_outlier()
or pdu.internal_metadata.outlier or pdu.internal_metadata.is_outlier()
) )
) )
if already_seen: if already_seen:
@ -604,7 +604,7 @@ class ReplicationLayer(object):
# ) # )
# Get missing pdus if necessary. # Get missing pdus if necessary.
if not pdu.internal_metadata.outlier: if not pdu.internal_metadata.is_outlier():
# We only backfill backwards to the min depth. # We only backfill backwards to the min depth.
min_depth = yield self.handler.get_min_depth_for_context( min_depth = yield self.handler.get_min_depth_for_context(
pdu.room_id pdu.room_id

View file

@ -79,7 +79,7 @@ class StateHandler(object):
defer.returnValue(False) defer.returnValue(False)
return return
if hasattr(event, "outlier") and event.outlier: if event.is_outlier():
event.state_group = None event.state_group = None
event.old_state_events = None event.old_state_events = None
event.state_events = None event.state_events = None

View file

@ -143,9 +143,7 @@ class DataStore(RoomMemberStore, RoomStore,
elif event.type == EventTypes.Redaction: elif event.type == EventTypes.Redaction:
self._store_redaction(txn, event) self._store_redaction(txn, event)
outlier = False outlier = event.internal_metadata.is_outlier()
if hasattr(event.internal_metadata, "outlier"):
outlier = event.internal_metadata.outlier
event_dict = { event_dict = {
k: v k: v