You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Return the promise so the failure actually propagates through the promise chain. Makes the invite error handling code work.
Fixes https://github.com/vector-im/vector-web/issues/691
This commit is contained in:
@@ -202,12 +202,12 @@ module.exports = React.createClass({
|
||||
var promise = inviteWarningDefer.promise;
|
||||
if (isEmailAddress) {
|
||||
promise = promise.then(function() {
|
||||
MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText);
|
||||
return MatrixClientPeg.get().inviteByEmail(self.props.roomId, inputText);
|
||||
});
|
||||
}
|
||||
else {
|
||||
promise = promise.then(function() {
|
||||
MatrixClientPeg.get().invite(self.props.roomId, inputText);
|
||||
return MatrixClientPeg.get().invite(self.props.roomId, inputText);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user