mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 17:33:09 -06:00
Constants and comments
This commit is contained in:
parent
a620f30a02
commit
f705480cf0
|
|
@ -159,7 +159,7 @@ func (t *txnReq) processEvent(e gomatrixserverlib.Event) error {
|
||||||
// TODO: Check that the event is allowed by its auth_events.
|
// TODO: Check that the event is allowed by its auth_events.
|
||||||
|
|
||||||
// pass the event to the roomserver
|
// pass the event to the roomserver
|
||||||
if err := t.producer.SendEvents([]gomatrixserverlib.Event{e}, ""); err != nil {
|
if err := t.producer.SendEvents([]gomatrixserverlib.Event{e}, api.DoNotSendToOtherServers); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ const (
|
||||||
KindBackfill = 4
|
KindBackfill = 4
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// DoNotSendToOtherServers tells us not to send the event to other matrix
|
||||||
|
// servers.
|
||||||
|
const DoNotSendToOtherServers = ""
|
||||||
|
|
||||||
// InputRoomEvent is a matrix room event to add to the room server database.
|
// InputRoomEvent is a matrix room event to add to the room server database.
|
||||||
// TODO: Implement UnmarshalJSON/MarshalJSON in a way that does something sensible with the event JSON.
|
// TODO: Implement UnmarshalJSON/MarshalJSON in a way that does something sensible with the event JSON.
|
||||||
type InputRoomEvent struct {
|
type InputRoomEvent struct {
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,14 @@ type OutputRoomEvent struct {
|
||||||
// Or empty if this event shouldn't be pushed to other servers.
|
// Or empty if this event shouldn't be pushed to other servers.
|
||||||
//
|
//
|
||||||
// This is used by the federation sender component. We need to tell it what
|
// This is used by the federation sender component. We need to tell it what
|
||||||
// event is needs to send because it can't tell on its own. Normally we
|
// event is needs to send because it can't tell on its own. Normally if an
|
||||||
// if an event was created on this server then we are responsible for
|
// event was created on this server then we are responsible for sending it.
|
||||||
// sending. However there are a couple of exceptions. The first is that
|
// However there are a couple of exceptions. The first is that when the
|
||||||
// when the server joins a remote room through another matrix server, it
|
// server joins a remote room through another matrix server, it is the job
|
||||||
// is the job of the other matrix server to send the event over federation.
|
// of the other matrix server to send the event over federation. The second
|
||||||
// The second is the reverse of the first, that is when a remote server
|
// is the reverse of the first, that is when a remote server joins a room
|
||||||
// joins a room that we are in over federation using our server it is our
|
// that we are in over federation using our server it is our responsibility
|
||||||
// responsibility to send the join event to other matrix server.
|
// to send the join event to other matrix servers.
|
||||||
//
|
//
|
||||||
// We encode the server name that the event should be sent using here to
|
// We encode the server name that the event should be sent using here to
|
||||||
// future proof the API for virtual hosting.
|
// future proof the API for virtual hosting.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue