func GetEvent(ctx context.Context, rsAPI RoomserverInternalAPI, eventID string) *gomatrixserverlib.HeaderedEvent {
	var res QueryEventsByIDResponse
	err := rsAPI.QueryEventsByID(ctx, &QueryEventsByIDRequest{
		EventIDs: []string{eventID},
	}, &res)
	if err != nil {
		util.GetLogger(ctx).WithError(err).Error("Failed to QueryEventsByID")
		return nil
	}
	if len(res.Events) != 1 {
		return nil
	}
	return &res.Events[0]
}
// GetEvent returns the event or nil, even on errors.
GetEvent returns the event or nil, even on errors.
// GetEvent returns the event or nil even on errors .
func GetEvent(ctx context.Context, rsAPI RoomserverInternalAPI, eventID string) *gomatrixserverlib.HeaderedEvent {
	var res QueryEventsByIDResponse
	err := rsAPI.QueryEventsByID(ctx, &QueryEventsByIDRequest{
		EventIDs: []string{eventID},
	}, &res)
	if err != nil {
		util.GetLogger(ctx).WithError(err).Error("Failed to QueryEventsByID")
		return nil
	}
	if len(res.Events) != 1 {
		return nil
	}
	return &res.Events[0]
}
func GetEvent ( ctx context . Context , rsAPI RoomserverInternalAPI , eventID string ) * gomatrixserverlib . HeaderedEvent { var res QueryEventsByIDResponse err := rsAPI . QueryEventsByID ( ctx , & QueryEventsByIDRequest { EventIDs : [ ] string { eventID } , } , & res ) if err != nil { util . GetLogger ( ctx ) . WithError ( err ) . Error ( " " ) return nil } if len ( res . Events ) != 1 { return nil } return & res . Events [ 0 ] }
GetEvent returns the event or nil, even on errors.
GetEvent returns the event or nil even on errors .