mirror of
https://github.com/matrix-org/dendrite
synced 2025-01-06 10:18:45 +00:00
Explain when we should use SendEvents instead of SendInvite.
Because it's easy to get confused between the two methods.
This commit is contained in:
parent
f1fce55697
commit
82c82a3412
1 changed files with 2 additions and 0 deletions
|
@ -86,6 +86,8 @@ func (c *RoomserverProducer) SendInputRoomEvents(ires []api.InputRoomEvent) erro
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendInvite writes the invite event to the roomserver input API.
|
// SendInvite writes the invite event to the roomserver input API.
|
||||||
|
// This should only be needed for invite events that occur outside of a known room.
|
||||||
|
// If we are in the room then the event should be sent using the SendEvents method.
|
||||||
func (c *RoomserverProducer) SendInvite(inviteEvent gomatrixserverlib.Event) error {
|
func (c *RoomserverProducer) SendInvite(inviteEvent gomatrixserverlib.Event) error {
|
||||||
request := api.InputRoomEventsRequest{
|
request := api.InputRoomEventsRequest{
|
||||||
InputInviteEvents: []api.InputInviteEvent{{Event: inviteEvent}},
|
InputInviteEvents: []api.InputInviteEvent{{Event: inviteEvent}},
|
||||||
|
|
Loading…
Reference in a new issue