mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 05:12:46 +00:00
Make PerformJoin responsible for sending invite to RS input (#1277)
* Make PerformJoin send input membership event * Invite input room events in separate goroutine * Don't limit roomserver input events using request context * Synchronous input room events * Nope, that didn't work * oops send state key to GetMembership * Don't generate stripped state in client API more times than necessary, generate output events on receiving end of federated invite * Commit membership updater changes * Tweaks
This commit is contained in:
parent
e7d450adb8
commit
a5a85c6a11
4 changed files with 98 additions and 78 deletions
|
@ -118,23 +118,6 @@ func SendInvite(
|
|||
return response.Error
|
||||
}
|
||||
|
||||
// Now send the invite event into the roomserver. If the room is known
|
||||
// locally then this will succeed, notifying existing users in the room
|
||||
// about the new invite. If the room isn't known locally then this will
|
||||
// fail - and that's also OK.
|
||||
inputReq := &InputRoomEventsRequest{
|
||||
InputRoomEvents: []InputRoomEvent{
|
||||
{
|
||||
Kind: KindNew,
|
||||
Event: inviteEvent,
|
||||
AuthEventIDs: inviteEvent.AuthEventIDs(),
|
||||
SendAsServer: string(sendAsServer),
|
||||
},
|
||||
},
|
||||
}
|
||||
inputRes := &InputRoomEventsResponse{}
|
||||
_ = rsAPI.InputRoomEvents(ctx, inputReq, inputRes)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue