mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Peeking via MSC2753 (#1370)
Initial implementation of MSC2753, as tested by https://github.com/matrix-org/sytest/pull/944. Doesn't yet handle unpeeks, peeked EDUs, or history viz changing during a peek - these will follow. https://github.com/matrix-org/dendrite/pull/1370 has full details.
This commit is contained in:
parent
35564dd73c
commit
39507bacc3
29 changed files with 1209 additions and 59 deletions
|
@ -46,6 +46,9 @@ const (
|
|||
// - Redact the event and set the corresponding `unsigned` fields to indicate it as redacted.
|
||||
// - Replace the event in the database.
|
||||
OutputTypeRedactedEvent OutputType = "redacted_event"
|
||||
|
||||
// OutputTypeNewPeek indicates that the kafka event is an OutputNewPeek
|
||||
OutputTypeNewPeek OutputType = "new_peek"
|
||||
)
|
||||
|
||||
// An OutputEvent is an entry in the roomserver output kafka log.
|
||||
|
@ -59,8 +62,10 @@ type OutputEvent struct {
|
|||
NewInviteEvent *OutputNewInviteEvent `json:"new_invite_event,omitempty"`
|
||||
// The content of event with type OutputTypeRetireInviteEvent
|
||||
RetireInviteEvent *OutputRetireInviteEvent `json:"retire_invite_event,omitempty"`
|
||||
// The content of event with type OutputTypeRedactedEvent
|
||||
// The content of event with type OutputTypeRedactedEvent
|
||||
RedactedEvent *OutputRedactedEvent `json:"redacted_event,omitempty"`
|
||||
// The content of event with type OutputTypeNewPeek
|
||||
NewPeek *OutputNewPeek `json:"new_peek,omitempty"`
|
||||
}
|
||||
|
||||
// An OutputNewRoomEvent is written when the roomserver receives a new event.
|
||||
|
@ -195,3 +200,11 @@ type OutputRedactedEvent struct {
|
|||
// The value of `unsigned.redacted_because` - the redaction event itself
|
||||
RedactedBecause gomatrixserverlib.HeaderedEvent
|
||||
}
|
||||
|
||||
// An OutputNewPeek is written whenever a user starts peeking into a room
|
||||
// using a given device.
|
||||
type OutputNewPeek struct {
|
||||
RoomID string
|
||||
UserID string
|
||||
DeviceID string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue