mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Event relations (#2790)
This adds support for tracking `m.relates_to`, as well as adding support for the various `/room/{roomID}/relations/...` endpoints to the CS API.
This commit is contained in:
parent
3c1474f68f
commit
23a3e04579
19 changed files with 943 additions and 51 deletions
|
@ -47,6 +47,14 @@ type StateDelta struct {
|
|||
// StreamPosition represents the offset in the sync stream a client is at.
|
||||
type StreamPosition int64
|
||||
|
||||
func NewStreamPositionFromString(s string) (StreamPosition, error) {
|
||||
n, err := strconv.Atoi(s)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return StreamPosition(n), nil
|
||||
}
|
||||
|
||||
// StreamEvent is the same as gomatrixserverlib.Event but also has the PDU stream position for this event.
|
||||
type StreamEvent struct {
|
||||
*gomatrixserverlib.HeaderedEvent
|
||||
|
@ -599,3 +607,8 @@ type OutputSendToDeviceEvent struct {
|
|||
type IgnoredUsers struct {
|
||||
List map[string]interface{} `json:"ignored_users"`
|
||||
}
|
||||
|
||||
type RelationEntry struct {
|
||||
Position StreamPosition
|
||||
EventID string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue