State hax

This commit is contained in:
Neil Alexander 2022-01-27 15:54:06 +00:00
parent 6c1848066d
commit ceac2ec821
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -145,10 +145,11 @@ func (r *Backfiller) backfillViaFederation(ctx context.Context, req *api.Perform
entries, err = r.DB.StateEntriesForEventIDs(ctx, stateIDs)
if err != nil {
logrus.WithError(err).WithField("event_id", ev.EventID()).Error("backfillViaFederation: failed to get state entries for event")
return err
//return err
}
}
if len(entries) > 0 {
var beforeStateSnapshotNID types.StateSnapshotNID
if beforeStateSnapshotNID, err = r.DB.AddState(ctx, roomNID, nil, entries); err != nil {
logrus.WithError(err).WithField("event_id", ev.EventID()).Error("backfillViaFederation: failed to persist state entries to get snapshot nid")
@ -158,6 +159,7 @@ func (r *Backfiller) backfillViaFederation(ctx context.Context, req *api.Perform
logrus.WithError(err).WithField("event_id", ev.EventID()).Error("backfillViaFederation: failed to persist snapshot nid")
}
}
}
// TODO: update backwards extremities, as that should be moved from syncapi to roomserver at some point.