Fix error passing

This commit is contained in:
Neil Alexander 2020-08-14 16:55:54 +01:00
parent 51c642b8ad
commit 372ff70906
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,7 @@ type PerformInviteRequest struct {
}
type PerformInviteResponse struct {
Error *PerformError `json:"error"`
Error *PerformError
}
// PerformBackfillRequest is a request to PerformBackfill.

View file

@ -112,11 +112,11 @@ func SendInvite(
}
response := &PerformInviteResponse{}
if err := rsAPI.PerformInvite(ctx, request, response); err != nil {
return fmt.Errorf("rsAPI.PerformInvite: %w", err)
}
if response.Error != nil {
return response.Error
}
return fmt.Errorf("rsAPI.PerformInvite: %w", err)
}
// Now send the invite event into the roomserver. If the room is known
// locally then this will succeed, notifying existing users in the room