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
Tidy up fix to multi-invite
This commit is contained in:
@@ -180,8 +180,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_doInvite(address) {
|
_doInvite(address) {
|
||||||
var self = this;
|
Invite.inviteToRoom(this.props.roomId, address).catch((err) => {
|
||||||
Invite.inviteToRoom(self.props.roomId, address).catch((err) => {
|
|
||||||
if (err !== null) {
|
if (err !== null) {
|
||||||
console.error("Failed to invite: %s", JSON.stringify(err));
|
console.error("Failed to invite: %s", JSON.stringify(err));
|
||||||
if (err.errcode == 'M_FORBIDDEN') {
|
if (err.errcode == 'M_FORBIDDEN') {
|
||||||
@@ -197,7 +196,7 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
self.setState({
|
this.setState({
|
||||||
inviting: false
|
inviting: false
|
||||||
});
|
});
|
||||||
// XXX: hacky focus on the invite box
|
// XXX: hacky focus on the invite box
|
||||||
@@ -208,7 +207,7 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
}).done();
|
}).done();
|
||||||
self.setState({
|
this.setState({
|
||||||
inviting: true
|
inviting: true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user