mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
502cba0be5
@ -22,6 +22,7 @@ import MatrixClientPeg from './MatrixClientPeg';
|
|||||||
import GroupStoreCache from './stores/GroupStoreCache';
|
import GroupStoreCache from './stores/GroupStoreCache';
|
||||||
|
|
||||||
export function showGroupInviteDialog(groupId) {
|
export function showGroupInviteDialog(groupId) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
const description = <div>
|
const description = <div>
|
||||||
<div>{ _t("Who would you like to add to this community?") }</div>
|
<div>{ _t("Who would you like to add to this community?") }</div>
|
||||||
<div className="warning">
|
<div className="warning">
|
||||||
@ -42,9 +43,10 @@ export function showGroupInviteDialog(groupId) {
|
|||||||
onFinished: (success, addrs) => {
|
onFinished: (success, addrs) => {
|
||||||
if (!success) return;
|
if (!success) return;
|
||||||
|
|
||||||
_onGroupInviteFinished(groupId, addrs);
|
_onGroupInviteFinished(groupId, addrs).then(resolve, reject);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showGroupAddRoomDialog(groupId) {
|
export function showGroupAddRoomDialog(groupId) {
|
||||||
@ -87,7 +89,7 @@ function _onGroupInviteFinished(groupId, addrs) {
|
|||||||
|
|
||||||
const addrTexts = addrs.map((addr) => addr.address);
|
const addrTexts = addrs.map((addr) => addr.address);
|
||||||
|
|
||||||
multiInviter.invite(addrTexts).then((completionStates) => {
|
return multiInviter.invite(addrTexts).then((completionStates) => {
|
||||||
// Show user any errors
|
// Show user any errors
|
||||||
const errorList = [];
|
const errorList = [];
|
||||||
for (const addr of Object.keys(completionStates)) {
|
for (const addr of Object.keys(completionStates)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user