aboutsummaryrefslogtreecommitdiff
path: root/roomserver/api/output.go
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/api/output.go')
-rw-r--r--roomserver/api/output.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/roomserver/api/output.go b/roomserver/api/output.go
index 013ebdc8..d57f3b04 100644
--- a/roomserver/api/output.go
+++ b/roomserver/api/output.go
@@ -68,6 +68,17 @@ type OutputEvent struct {
NewPeek *OutputNewPeek `json:"new_peek,omitempty"`
}
+// Type of the OutputNewRoomEvent.
+type OutputRoomEventType int
+
+const (
+ // The event is a timeline event and likely just happened.
+ OutputRoomTimeline OutputRoomEventType = iota
+
+ // The event is a state event and quite possibly happened in the past.
+ OutputRoomState
+)
+
// An OutputNewRoomEvent is written when the roomserver receives a new event.
// It contains the full matrix room event and enough information for a
// consumer to construct the current state of the room and the state before the
@@ -80,6 +91,9 @@ type OutputEvent struct {
type OutputNewRoomEvent struct {
// The Event.
Event gomatrixserverlib.HeaderedEvent `json:"event"`
+ // Does the event completely rewrite the room state? If so, then AddsStateEventIDs
+ // will contain the entire room state.
+ RewritesState bool `json:"rewrites_state"`
// The latest events in the room after this event.
// This can be used to set the prev events for new events in the room.
// This also can be used to get the full current state after this event.