message: Rewrite getAllChannelMappings to not be O(N^2)
diff: @@ -168,18 +168,19 @@ DataStore.prototype.getAllChannelMappings = Promise.coroutine(function*() {
  }
  );
  - let roomIds = new Set(entries.map((e) => e.matrix_id));
  -
  let mappings = {};
  - roomIds.forEach((roomId) => {
  - mappings[roomId] = entries.filter(
  - (e) => e.matrix_id === roomId && Boolean(this._serverMappings[e.remote.domain])
  - ).map((e) => {
  - return {
  + entries.forEach((e) => {
  + // drop unknown irc networks in the database
  + if (!this._serverMappings[e.remote.domain]) {
  + return;
  + }
  + if (!mappings[e.matrix_id]) {
  + mappings[e.matrix_id] = [];
  + }
  + mappings[e.matrix_id].push({
  networkId: this._serverMappings[e.remote.domain].getNetworkId(),
  channel: e.remote.channel
  - }
  });
  });
  