Merge changes from main

This commit is contained in:
Devon Hudson 2023-07-06 17:58:17 -06:00
commit 4e27ff28b8
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -602,10 +602,16 @@ func (s *OutputRoomEventConsumer) updateStateEvent(event *rstypes.HeaderedEvent)
}
}
prevEventSender := string(prevEvent.SenderID())
prevUser, err := s.rsAPI.QueryUserIDForSender(s.ctx, *validRoomID, prevEvent.SenderID())
if err == nil && prevUser != nil {
prevEventSender = prevUser.String()
}
prev := types.PrevEventRef{
PrevContent: prevContent,
ReplacesState: prevEvent.EventID(),
PrevSenderID: string(prevEvent.SenderID()),
PrevSenderID: prevEventSender,
}
event.PDU, err = event.SetUnsigned(prev)