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"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Kind int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// KindOutlier event fall outside the contiguous event graph.
|
// KindOutlier event fall outside the contiguous event graph.
|
||||||
// We do not have the state for these events.
|
// We do not have the state for these events.
|
||||||
// These events are state events used to authenticate other events.
|
// These events are state events used to authenticate other events.
|
||||||
// They can become part of the contiguous event graph via backfill.
|
// 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.
|
// KindNew event extend the contiguous graph going forwards.
|
||||||
// They usually don't need state, but may include state if the
|
// 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
|
// there was a new event that references an event that we don't
|
||||||
// have a copy of.
|
// have a copy of.
|
||||||
KindNew = 2
|
KindNew
|
||||||
// KindBackfill event extend the contiguous graph going backwards.
|
// KindBackfill event extend the contiguous graph going backwards.
|
||||||
// They always have state.
|
// They always have state.
|
||||||
KindBackfill = 3
|
KindBackfill
|
||||||
)
|
)
|
||||||
|
|
||||||
// DoNotSendToOtherServers tells us not to send the event to other matrix
|
// DoNotSendToOtherServers tells us not to send the event to other matrix
|
||||||
|
|
@ -44,7 +46,7 @@ const DoNotSendToOtherServers = ""
|
||||||
type InputRoomEvent struct {
|
type InputRoomEvent struct {
|
||||||
// Whether this event is new, backfilled or an outlier.
|
// Whether this event is new, backfilled or an outlier.
|
||||||
// This controls how the event is processed.
|
// This controls how the event is processed.
|
||||||
Kind int `json:"kind"`
|
Kind Kind `json:"kind"`
|
||||||
// The event JSON for the event to add.
|
// The event JSON for the event to add.
|
||||||
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
||||||
// List of state event IDs that authenticate this event.
|
// List of state event IDs that authenticate this event.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue