func SendEvents(
	ctx context.Context, rsAPI RoomserverInternalAPI, events []gomatrixserverlib.HeaderedEvent,
	sendAsServer gomatrixserverlib.ServerName, txnID *TransactionID,
) error {
	ires := make([]InputRoomEvent, len(events))
	for i, event := range events {
		ires[i] = InputRoomEvent{
			Kind:          KindNew,
			Event:         event,
			AuthEventIDs:  event.AuthEventIDs(),
			SendAsServer:  string(sendAsServer),
			TransactionID: txnID,
		}
	}
	return SendInputRoomEvents(ctx, rsAPI, ires)
}
// SendEvents to the roomserver The events are written with KindNew.
SendEvents to the roomserver The events are written with KindNew.
// SendEvents to the roomserver The events are written with KindNew .
func SendEvents(
	ctx context.Context, rsAPI RoomserverInternalAPI, events []gomatrixserverlib.HeaderedEvent,
	sendAsServer gomatrixserverlib.ServerName, txnID *TransactionID,
) error {
	ires := make([]InputRoomEvent, len(events))
	for i, event := range events {
		ires[i] = InputRoomEvent{
			Kind:          KindNew,
			Event:         event,
			AuthEventIDs:  event.AuthEventIDs(),
			SendAsServer:  string(sendAsServer),
			TransactionID: txnID,
		}
	}
	return SendInputRoomEvents(ctx, rsAPI, ires)
}
func SendEvents ( ctx context . Context , rsAPI RoomserverInternalAPI , events [ ] gomatrixserverlib . HeaderedEvent , sendAsServer gomatrixserverlib . ServerName , txnID * TransactionID , ) error { ires := make ( [ ] InputRoomEvent , len ( events ) ) for i , event := range events { ires [ i ] = InputRoomEvent { Kind : KindNew , Event : event , AuthEventIDs : event . AuthEventIDs ( ) , SendAsServer : string ( sendAsServer ) , TransactionID : txnID , } } return SendInputRoomEvents ( ctx , rsAPI , ires ) }
SendEvents to the roomserver The events are written with KindNew.
SendEvents to the roomserver The events are written with KindNew .