Tweak messages

This commit is contained in:
Neil Alexander 2021-01-20 16:24:07 +00:00
parent 10f2e8d92f
commit 9ee4ca0088
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 75 additions and 0 deletions

View file

@ -517,6 +517,9 @@ func (d *Database) MostRecentMembership(
if err != nil {
return nil, 0, fmt.Errorf("d.CurrentRoomState.SelectStateEvent: %w", err)
}
if event == nil {
return nil, 0, nil
}
pos, err := d.OutputEvents.SelectPositionInStream(ctx, nil, event.EventID())
if err != nil {
return nil, 0, fmt.Errorf("d.OutputEvents.SelectPositionInStream: %w", err)