mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 06:43:09 -06:00
Define Kind type
This commit is contained in:
parent
737802fc06
commit
3a5c0922e7
|
|
@ -19,20 +19,22 @@ import (
|
|||
"github.com/matrix-org/gomatrixserverlib"
|
||||
)
|
||||
|
||||
type Kind int
|
||||
|
||||
const (
|
||||
// KindOutlier event fall outside the contiguous event graph.
|
||||
// We do not have the state for these events.
|
||||
// These events are state events used to authenticate other events.
|
||||
// They can become part of the contiguous event graph via backfill.
|
||||
KindOutlier = 1
|
||||
KindOutlier Kind = iota + 1
|
||||
// KindNew event extend the contiguous graph going forwards.
|
||||
// They usually don't need state, but may include state if the
|
||||
// there was a new event that references an event that we don't
|
||||
// have a copy of.
|
||||
KindNew = 2
|
||||
KindNew
|
||||
// KindBackfill event extend the contiguous graph going backwards.
|
||||
// They always have state.
|
||||
KindBackfill = 3
|
||||
KindBackfill
|
||||
)
|
||||
|
||||
// DoNotSendToOtherServers tells us not to send the event to other matrix
|
||||
|
|
@ -44,7 +46,7 @@ const DoNotSendToOtherServers = ""
|
|||
type InputRoomEvent struct {
|
||||
// Whether this event is new, backfilled or an outlier.
|
||||
// This controls how the event is processed.
|
||||
Kind int `json:"kind"`
|
||||
Kind Kind `json:"kind"`
|
||||
// The event JSON for the event to add.
|
||||
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
||||
// List of state event IDs that authenticate this event.
|
||||
|
|
|
|||
Loading…
Reference in a new issue