mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Fix tests hopefully
This commit is contained in:
parent
cda580bdbe
commit
9c5f38f9e5
|
|
@ -133,7 +133,7 @@ func (r *Inputer) processRoomEvent(
|
||||||
if event.Type() != gomatrixserverlib.MRoomCreate || !event.StateKeyEquals("") {
|
if event.Type() != gomatrixserverlib.MRoomCreate || !event.StateKeyEquals("") {
|
||||||
missingAuthIDs, missingPrevIDs, err := updater.MissingAuthPrevEvents(ctx, event)
|
missingAuthIDs, missingPrevIDs, err := updater.MissingAuthPrevEvents(ctx, event)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return rollbackTransaction, fmt.Errorf("r.DB.MissingAuthPrevEvents: %w", err)
|
return rollbackTransaction, fmt.Errorf("updater.MissingAuthPrevEvents: %w", err)
|
||||||
}
|
}
|
||||||
missingAuth = len(missingAuthIDs) > 0
|
missingAuth = len(missingAuthIDs) > 0
|
||||||
missingPrev = !input.HasState && len(missingPrevIDs) > 0
|
missingPrev = !input.HasState && len(missingPrevIDs) > 0
|
||||||
|
|
|
||||||
|
|
@ -100,15 +100,6 @@ func (u *RoomUpdater) CurrentStateSnapshotNID() types.StateSnapshotNID {
|
||||||
func (u *RoomUpdater) MissingAuthPrevEvents(
|
func (u *RoomUpdater) MissingAuthPrevEvents(
|
||||||
ctx context.Context, e *gomatrixserverlib.Event,
|
ctx context.Context, e *gomatrixserverlib.Event,
|
||||||
) (missingAuth, missingPrev []string, err error) {
|
) (missingAuth, missingPrev []string, err error) {
|
||||||
var info *types.RoomInfo
|
|
||||||
info, err = u.RoomInfo(ctx, e.RoomID())
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if info == nil || !info.IsStub {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, authEventID := range e.AuthEventIDs() {
|
for _, authEventID := range e.AuthEventIDs() {
|
||||||
if nids, err := u.EventNIDs(ctx, []string{authEventID}); err != nil || len(nids) == 0 {
|
if nids, err := u.EventNIDs(ctx, []string{authEventID}); err != nil || len(nids) == 0 {
|
||||||
missingAuth = append(missingAuth, authEventID)
|
missingAuth = append(missingAuth, authEventID)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue