mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 22:03:10 -06:00
Fix error passing
This commit is contained in:
parent
51c642b8ad
commit
372ff70906
|
|
@ -105,7 +105,7 @@ type PerformInviteRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type PerformInviteResponse struct {
|
type PerformInviteResponse struct {
|
||||||
Error *PerformError `json:"error"`
|
Error *PerformError
|
||||||
}
|
}
|
||||||
|
|
||||||
// PerformBackfillRequest is a request to PerformBackfill.
|
// PerformBackfillRequest is a request to PerformBackfill.
|
||||||
|
|
|
||||||
|
|
@ -112,11 +112,11 @@ func SendInvite(
|
||||||
}
|
}
|
||||||
response := &PerformInviteResponse{}
|
response := &PerformInviteResponse{}
|
||||||
if err := rsAPI.PerformInvite(ctx, request, response); err != nil {
|
if err := rsAPI.PerformInvite(ctx, request, response); err != nil {
|
||||||
if response.Error != nil {
|
|
||||||
return response.Error
|
|
||||||
}
|
|
||||||
return fmt.Errorf("rsAPI.PerformInvite: %w", err)
|
return fmt.Errorf("rsAPI.PerformInvite: %w", err)
|
||||||
}
|
}
|
||||||
|
if response.Error != nil {
|
||||||
|
return response.Error
|
||||||
|
}
|
||||||
|
|
||||||
// Now send the invite event into the roomserver. If the room is known
|
// Now send the invite event into the roomserver. If the room is known
|
||||||
// locally then this will succeed, notifying existing users in the room
|
// locally then this will succeed, notifying existing users in the room
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue