func GetStateEvent(ctx context.Context, rsAPI RoomserverInternalAPI, roomID string, tuple gomatrixserverlib.StateKeyTuple) *gomatrixserverlib.HeaderedEvent {
	var res QueryCurrentStateResponse
	err := rsAPI.QueryCurrentState(ctx, &QueryCurrentStateRequest{
		RoomID:      roomID,
		StateTuples: []gomatrixserverlib.StateKeyTuple{tuple},
	}, &res)
	if err != nil {
		util.GetLogger(ctx).WithError(err).Error("Failed to QueryCurrentState")
		return nil
	}
	ev, ok := res.StateEvents[tuple]
	if ok {
		return ev
	}
	return nil
}
// GetStateEvent returns the current state event in the room or nil.
GetStateEvent returns the current state event in the room or nil.
// GetStateEvent returns the current state event in the room or nil .
func GetStateEvent(ctx context.Context, rsAPI RoomserverInternalAPI, roomID string, tuple gomatrixserverlib.StateKeyTuple) *gomatrixserverlib.HeaderedEvent {
	var res QueryCurrentStateResponse
	err := rsAPI.QueryCurrentState(ctx, &QueryCurrentStateRequest{
		RoomID:      roomID,
		StateTuples: []gomatrixserverlib.StateKeyTuple{tuple},
	}, &res)
	if err != nil {
		util.GetLogger(ctx).WithError(err).Error("Failed to QueryCurrentState")
		return nil
	}
	ev, ok := res.StateEvents[tuple]
	if ok {
		return ev
	}
	return nil
}
func GetStateEvent ( ctx context . Context , rsAPI RoomserverInternalAPI , roomID string , tuple gomatrixserverlib . StateKeyTuple ) * gomatrixserverlib . HeaderedEvent { var res QueryCurrentStateResponse err := rsAPI . QueryCurrentState ( ctx , & QueryCurrentStateRequest { RoomID : roomID , StateTuples : [ ] gomatrixserverlib . StateKeyTuple { tuple } , } , & res ) if err != nil { util . GetLogger ( ctx ) . WithError ( err ) . Error ( " " ) return nil } ev , ok := res . StateEvents [ tuple ] if ok { return ev } return nil }
GetStateEvent returns the current state event in the room or nil.
GetStateEvent returns the current state event in the room or nil .