From e708e59b1535b10baefb648047d0335d775ca719 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 23 Aug 2016 17:27:47 +0100 Subject: [PATCH] Add a TODO about batching events --- lib/crypto-algorithms/megolm.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/crypto-algorithms/megolm.js b/lib/crypto-algorithms/megolm.js index ef7ab511f..908b0e623 100644 --- a/lib/crypto-algorithms/megolm.js +++ b/lib/crypto-algorithms/megolm.js @@ -131,6 +131,12 @@ MegolmEncryption.prototype._ensureOutboundSession = function(room) { var txnId = txnBase + (txnCtr++); // TODO: send an OOB message. for now, send an in-band message. + + // TODO: aggregate the messages into batches. If we make a + // separate request for each message, we will get rate-limited. + // On the other hand, we can't just send them in one big batch, + // because we'll hit the event size limit. + var path = utils.encodeUri( "/rooms/$roomId/send/m.room.encrypted/$txnId", { $roomId: self._roomId,