From 89f1ffd98120ad7022116a48b58665dcdc3b0398 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 21 Jan 2025 15:00:00 +0000 Subject: [PATCH] invite: Refresh the schedule if we can --- src/commands/InviteCommand.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/commands/InviteCommand.ts b/src/commands/InviteCommand.ts index 4e7458c..c9851ef 100644 --- a/src/commands/InviteCommand.ts +++ b/src/commands/InviteCommand.ts @@ -89,6 +89,13 @@ export class InviteCommand implements ICommand { } public async run(managementRoomId: string, event: any, args: string[]) { + try { + // Try to refresh the schedule first, to ensure we don't miss any updates. + await this.conference.backend.refresh(); + } catch (error) { + LogService.error(`StatusCommand`, `Failed to opportunistically refresh the backend (continuing invites anyway): ${error}`) + } + await this.client.replyNotice(managementRoomId, event, "Sending invites to participants. This might take a while."); // This is called invite but it's really membership sync in a way. We're iterating over