SendEvents to the roomserver The events are written with KindNew.
( ctx context.Context, rsAPI InputRoomEventsAPI, kind Kind, events []*gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName, sendAsServer gomatrixserverlib.ServerName, txnID *TransactionID, async bool, )
| 23 | |
| 24 | // SendEvents to the roomserver The events are written with KindNew. |
| 25 | func SendEvents( |
| 26 | ctx context.Context, rsAPI InputRoomEventsAPI, |
| 27 | kind Kind, events []*gomatrixserverlib.HeaderedEvent, |
| 28 | origin gomatrixserverlib.ServerName, |
| 29 | sendAsServer gomatrixserverlib.ServerName, txnID *TransactionID, |
| 30 | async bool, |
| 31 | ) error { |
| 32 | ires := make([]InputRoomEvent, len(events)) |
| 33 | for i, event := range events { |
| 34 | ires[i] = InputRoomEvent{ |
| 35 | Kind: kind, |
| 36 | Event: event, |
| 37 | Origin: origin, |
| 38 | SendAsServer: string(sendAsServer), |
| 39 | TransactionID: txnID, |
| 40 | } |
| 41 | } |
| 42 | return SendInputRoomEvents(ctx, rsAPI, ires, async) |
| 43 | } |
| 44 | |
| 45 | // SendEventWithState writes an event with the specified kind to the roomserver |
| 46 | // with the state at the event as KindOutlier before it. Will not send any event that is |
nothing calls this directly
no test coverage detected