Merge pull request #6887 from matrix-org/t3chguy/fix/19216

This commit is contained in:
Michael Telatynski 2021-10-06 09:29:25 +01:00 committed by GitHub
commit 1d5a1c7a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 78 additions and 15 deletions

View file

@ -62,8 +62,9 @@ export default class MultiInviter {
/**
* @param {string} targetId The ID of the room or group to invite to
* @param {function} progressCallback optional callback, fired after each invite.
*/
constructor(targetId: string) {
constructor(targetId: string, private readonly progressCallback?: () => void) {
if (targetId[0] === '+') {
this.roomId = null;
this.groupId = targetId;
@ -181,6 +182,7 @@ export default class MultiInviter {
delete this.errors[address];
resolve();
this.progressCallback?.();
}).catch((err) => {
if (this.canceled) {
return;