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.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/roomserver/api/output.go b/roomserver/api/output.go
index 2993813c..d60d1cc8 100644
--- a/roomserver/api/output.go
+++ b/roomserver/api/output.go
@@ -51,6 +51,8 @@ const (
// OutputTypeNewPeek indicates that the kafka event is an OutputNewPeek
OutputTypeNewPeek OutputType = "new_peek"
+ // OutputTypeNewInboundPeek indicates that the kafka event is an OutputNewInboundPeek
+ OutputTypeNewInboundPeek OutputType = "new_inbound_peek"
// OutputTypeRetirePeek indicates that the kafka event is an OutputRetirePeek
OutputTypeRetirePeek OutputType = "retire_peek"
)
@@ -72,6 +74,8 @@ type OutputEvent struct {
RedactedEvent *OutputRedactedEvent `json:"redacted_event,omitempty"`
// The content of event with type OutputTypeNewPeek
NewPeek *OutputNewPeek `json:"new_peek,omitempty"`
+ // The content of event with type OutputTypeNewInboundPeek
+ NewInboundPeek *OutputNewInboundPeek `json:"new_inbound_peek,omitempty"`
// The content of event with type OutputTypeRetirePeek
RetirePeek *OutputRetirePeek `json:"retire_peek,omitempty"`
}
@@ -245,6 +249,19 @@ type OutputNewPeek struct {
DeviceID string
}
+// An OutputNewInboundPeek is written whenever a server starts peeking into a room
+type OutputNewInboundPeek struct {
+ RoomID string
+ PeekID string
+ // the event ID at which the peek begins (so we can avoid
+ // a race between tracking the state returned by /peek and emitting subsequent
+ // peeked events)
+ LatestEventID string
+ ServerName gomatrixserverlib.ServerName
+ // how often we told the peeking server to renew the peek
+ RenewalInterval int64
+}
+
// An OutputRetirePeek is written whenever a user stops peeking into a room.
type OutputRetirePeek struct {
RoomID string