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
6 changed files with 78 additions and 15 deletions
+3 -1
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;