mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 21:12:45 +00:00
Invites v2 endpoint (#952)
* Start converting v1 invite endpoint to v2 * Update gomatrixserverlib * Early federationsender code for sending invites * Sending invites sorta happens now * Populate invite request with stripped state * Remodel a bit, don't reflect received invites * Handle invite_room_state * Handle room versions a bit better * Update gomatrixserverlib * Tweak order in destinationQueue.next * Revert check in processMessage * Tweak federation sender destination queue code a bit * Add comments
This commit is contained in:
parent
955244c092
commit
067b875063
18 changed files with 286 additions and 95 deletions
|
@ -86,7 +86,9 @@ type TransactionID struct {
|
|||
// the usual context a matrix room event would have. We usually do not have
|
||||
// access to the events needed to check the event auth rules for the invite.
|
||||
type InputInviteEvent struct {
|
||||
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
||||
RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
|
||||
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
||||
InviteRoomState []gomatrixserverlib.InviteV2StrippedState `json:"invite_room_state"`
|
||||
}
|
||||
|
||||
// InputRoomEventsRequest is a request to InputRoomEvents
|
||||
|
|
|
@ -116,6 +116,8 @@ type OutputNewRoomEvent struct {
|
|||
// Invite events can be received outside of an existing room so have to be
|
||||
// tracked separately from the room events themselves.
|
||||
type OutputNewInviteEvent struct {
|
||||
// The room version of the invited room.
|
||||
RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
|
||||
// The "m.room.member" invite event.
|
||||
Event gomatrixserverlib.HeaderedEvent `json:"event"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue