Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Aug 24, 2022
1 parent 35aaf87 commit 483ffad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
declare module 'meteor/konecty:multiple-instances-status' {
namespace InstanceStatus {
function id(): string;

function registerInstance(name: string, instance: Record<string, unknown>): void;
}
}
File renamed without changes.
5 changes: 5 additions & 0 deletions apps/meteor/server/stream/streamBroadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { InstanceStatus } from 'meteor/konecty:multiple-instances-status';
import { check } from 'meteor/check';
import { DDP } from 'meteor/ddp';
import { InstanceStatus as InstanceStatusRaw } from '@rocket.chat/models';
import { TAPi18n } from 'meteor/rocketchat:tap-i18n';

import { Logger } from '../lib/logger/Logger';
import { hasPermission } from '../../app/authorization/server';
Expand Down Expand Up @@ -67,6 +68,10 @@ function startMatrixBroadcast() {
added: Meteor.bindEnvironment((record) => {
cache.set(record._id, record);

if (cache.size() > 1) {
logger.warn(TAPi18n.__('Multiple_monolith_instances_alert'));
}

const subPath = getURL('', { cdn: false, full: false });
let instance = `${record.extraInformation.host}:${record.extraInformation.port}${subPath}`;

Expand Down

0 comments on commit 483ffad

Please sign in to comment.