mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-10 07:04:24 +00:00
Always try to get a roomInfo, avoid empty roomVersion?
This commit is contained in:
parent
baef523cb0
commit
4a868f1687
1 changed files with 6 additions and 10 deletions
|
@ -333,11 +333,9 @@ func (r *Inputer) processRoomEvent(
|
|||
}
|
||||
}
|
||||
|
||||
if roomInfo == nil {
|
||||
roomInfo, err = r.DB.GetOrCreateRoomInfo(ctx, event)
|
||||
if err != nil {
|
||||
return fmt.Errorf("r.DB.GetOrCreateRoomInfo: %w", err)
|
||||
}
|
||||
roomInfo, err = r.DB.GetOrCreateRoomInfo(ctx, event)
|
||||
if err != nil {
|
||||
return fmt.Errorf("r.DB.GetOrCreateRoomInfo: %w", err)
|
||||
}
|
||||
|
||||
eventTypeNID, err := r.DB.GetOrCreateEventTypeNID(ctx, event.Type())
|
||||
|
@ -704,11 +702,9 @@ nextAuthEvent:
|
|||
logger.WithError(err).Warnf("Auth event %s rejected", authEvent.EventID())
|
||||
}
|
||||
|
||||
if roomInfo == nil {
|
||||
roomInfo, err = r.DB.GetOrCreateRoomInfo(ctx, authEvent)
|
||||
if err != nil {
|
||||
return fmt.Errorf("r.DB.GetOrCreateRoomInfo: %w", err)
|
||||
}
|
||||
roomInfo, err = r.DB.GetOrCreateRoomInfo(ctx, authEvent)
|
||||
if err != nil {
|
||||
return fmt.Errorf("r.DB.GetOrCreateRoomInfo: %w", err)
|
||||
}
|
||||
|
||||
eventTypeNID, err := r.DB.GetOrCreateEventTypeNID(ctx, authEvent.Type())
|
||||
|
|
Loading…
Reference in a new issue