diff --git a/backend/src/matrix.js b/backend/src/matrix.js index 2887300..5539e29 100644 --- a/backend/src/matrix.js +++ b/backend/src/matrix.js @@ -20,7 +20,8 @@ const cryptoProvider = new RustSdkCryptoStorageProvider(BOT_CRYPTO_STORAGE_PATH) let client; let joinedRooms; const processOutboundQueue = async ({ text }) => { - joinedRooms.forEach(async (roomId) => { + console.log('broadcasting', { text }); + await Promise.each(joinedRooms, async (roomId) => { await client.sendText(roomId, text); }); }; @@ -54,6 +55,7 @@ const start = async () => { if (!body?.startsWith('!hello')) return; // Now that we've passed all the checks, we can actually act upon the command + console.log(`!hello roomId ${roomId}`); await client.replyNotice(roomId, event, 'Hello world!'); }