diff --git a/.gitignore b/.gitignore index 94e0c862f79c8..0ab302076cff1 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,5 @@ deploy/staging/settings-staging.json deploy/staging/deployment_token.json deploy/production/settings-production.json deploy/production/deployment_token.json +private/localhost.crt +private/localhost.key diff --git a/.meteor/packages b/.meteor/packages index 71760d1b75d9c..37c1f8ee11752 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -38,25 +38,25 @@ spacebars standard-minifier-js@2.3.1 tracker@1.1.3 -rocketchat:2fa +#rocketchat:2fa rocketchat:action-links -rocketchat:accounts -rocketchat:analytics +#rocketchat:accounts +#rocketchat:analytics rocketchat:api rocketchat:assets rocketchat:authorization rocketchat:autolinker -rocketchat:autotranslate -rocketchat:bot-helpers +#rocketchat:autotranslate +#rocketchat:bot-helpers rocketchat:cas rocketchat:channel-settings rocketchat:channel-settings-mail-messages rocketchat:colors -rocketchat:crowd -rocketchat:custom-oauth -rocketchat:custom-sounds -rocketchat:dolphin -rocketchat:drupal +#rocketchat:crowd +#rocketchat:custom-oauth +#rocketchat:custom-sounds +#rocketchat:dolphin +#rocketchat:drupal rocketchat:emoji rocketchat:emoji-custom rocketchat:emoji-emojione @@ -64,36 +64,36 @@ rocketchat:error-handler rocketchat:favico rocketchat:file rocketchat:file-upload -rocketchat:github-enterprise -rocketchat:gitlab +#rocketchat:github-enterprise +#rocketchat:gitlab #rocketchat:google-natural-language -rocketchat:google-vision -rocketchat:grant -rocketchat:grant-facebook -rocketchat:grant-github -rocketchat:grant-google -rocketchat:graphql +#rocketchat:google-vision +#rocketchat:grant +#rocketchat:grant-facebook +#rocketchat:grant-github +#rocketchat:grant-google +#rocketchat:graphql rocketchat:highlight-words rocketchat:iframe-login -rocketchat:importer -rocketchat:importer-csv -rocketchat:importer-hipchat -rocketchat:importer-hipchat-enterprise -rocketchat:importer-slack -rocketchat:importer-slack-users -rocketchat:integrations -rocketchat:internal-hubot -rocketchat:irc -rocketchat:issuelinks -rocketchat:katex -rocketchat:ldap +#rocketchat:importer +#rocketchat:importer-csv +#rocketchat:importer-hipchat +#rocketchat:importer-hipchat-enterprise +#rocketchat:importer-slack +#rocketchat:importer-slack-users +#rocketchat:integrations +#rocketchat:internal-hubot +#rocketchat:irc +#rocketchat:issuelinks +#rocketchat:katex +#rocketchat:ldap rocketchat:lib #rocketchat:livechat -rocketchat:livestream +#rocketchat:livestream rocketchat:logger rocketchat:login-token rocketchat:mailer -rocketchat:mapview +#rocketchat:mapview rocketchat:markdown rocketchat:mentions rocketchat:mentions-flextab @@ -103,16 +103,16 @@ rocketchat:message-pin rocketchat:message-snippet rocketchat:message-star rocketchat:migrations -rocketchat:monitoring -rocketchat:oauth2-server-config +#rocketchat:monitoring +#rocketchat:oauth2-server-config rocketchat:oembed rocketchat:otr rocketchat:postcss -rocketchat:push-notifications +#rocketchat:push-notifications rocketchat:reactions rocketchat:apps -rocketchat:sandstorm -rocketchat:slackbridge +#rocketchat:sandstorm +#rocketchat:slackbridge rocketchat:slashcommands-archive rocketchat:slashcommands-asciiarts rocketchat:slashcommands-create @@ -130,13 +130,13 @@ rocketchat:slashcommands-topic rocketchat:slashcommands-unarchive rocketchat:slider rocketchat:smarsh-connector -rocketchat:spotify -rocketchat:statistics +#rocketchat:spotify +#rocketchat:statistics rocketchat:streamer rocketchat:theme rocketchat:tokenpass rocketchat:tooltip -rocketchat:tutum +#rocketchat:tutum rocketchat:ui rocketchat:ui-account rocketchat:ui-admin @@ -147,9 +147,9 @@ rocketchat:ui-message rocketchat:ui-sidenav rocketchat:ui-vrecord rocketchat:version -rocketchat:videobridge -rocketchat:webrtc -rocketchat:wordpress +#rocketchat:videobridge +#rocketchat:webrtc +#rocketchat:wordpress rocketchat:nrr konecty:change-case @@ -167,7 +167,7 @@ jparker:gravatar kadira:blaze-layout kadira:flow-router keepnox:perfect-scrollbar -kenton:accounts-sandstorm +#kenton:accounts-sandstorm mizzao:autocomplete mizzao:timesync mrt:reactive-store @@ -175,12 +175,12 @@ mystor:device-detection nimble:restivus nooitaf:colors ostrio:cookies -pauli:accounts-linkedin +#pauli:accounts-linkedin percolate:synced-cron raix:handlebar-helpers -raix:push +#raix:push raix:ui-dropped-event -steffo:meteor-accounts-saml +#steffo:meteor-accounts-saml todda00:friendly-slugs yasaricli:slugify yasinuslu:blaze-meta diff --git a/.meteor/versions b/.meteor/versions index d6a2514130da9..31f471ebf3be0 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -65,7 +65,6 @@ jquery@1.11.11 kadira:blaze-layout@2.3.0 kadira:flow-router@2.12.1 keepnox:perfect-scrollbar@0.6.8 -kenton:accounts-sandstorm@0.7.0 konecty:change-case@2.3.0 konecty:delayed-task@1.0.0 konecty:mongo-counter@0.0.5_3 @@ -110,8 +109,6 @@ oauth2@1.2.0 observe-sequence@1.0.16 ordered-dict@1.1.0 ostrio:cookies@2.2.4 -pauli:accounts-linkedin@2.1.5 -pauli:linkedin-oauth@1.2.0 percolate:synced-cron@1.3.2 promise@0.10.2 raix:eventemitter@0.1.3 @@ -128,24 +125,17 @@ retry@1.1.0 rocketchat:2fa@0.0.1 rocketchat:accounts@0.0.1 rocketchat:action-links@0.0.1 -rocketchat:analytics@0.0.2 rocketchat:api@0.0.1 rocketchat:apps@1.0.0 rocketchat:assets@0.0.1 rocketchat:authorization@0.0.1 rocketchat:autolinker@0.0.1 -rocketchat:autotranslate@0.0.1 -rocketchat:bot-helpers@0.0.1 rocketchat:cas@1.0.0 rocketchat:channel-settings@0.0.1 rocketchat:channel-settings-mail-messages@0.0.1 rocketchat:colors@0.0.1 rocketchat:cors@0.0.1 -rocketchat:crowd@1.0.0 rocketchat:custom-oauth@1.0.0 -rocketchat:custom-sounds@1.0.0 -rocketchat:dolphin@0.0.2 -rocketchat:drupal@0.0.1 rocketchat:emoji@1.0.0 rocketchat:emoji-custom@1.0.0 rocketchat:emoji-emojione@0.0.1 @@ -153,35 +143,13 @@ rocketchat:error-handler@1.0.0 rocketchat:favico@0.0.1 rocketchat:file@0.0.1 rocketchat:file-upload@0.0.1 -rocketchat:github-enterprise@0.0.1 -rocketchat:gitlab@0.0.1 -rocketchat:google-vision@0.0.1 -rocketchat:grant@0.0.1 -rocketchat:grant-facebook@0.0.1 -rocketchat:grant-github@0.0.1 -rocketchat:grant-google@0.0.1 -rocketchat:graphql@0.0.1 rocketchat:highlight-words@0.0.1 rocketchat:i18n@0.0.1 rocketchat:iframe-login@1.0.0 -rocketchat:importer@0.0.1 -rocketchat:importer-csv@1.0.0 -rocketchat:importer-hipchat@0.0.1 -rocketchat:importer-hipchat-enterprise@1.0.0 -rocketchat:importer-slack@0.0.1 -rocketchat:importer-slack-users@1.0.0 -rocketchat:integrations@0.0.1 -rocketchat:internal-hubot@0.0.1 -rocketchat:irc@0.0.2 -rocketchat:issuelinks@0.0.1 -rocketchat:katex@0.0.1 -rocketchat:ldap@0.0.1 rocketchat:lib@0.0.1 -rocketchat:livestream@0.0.5 rocketchat:logger@0.0.1 rocketchat:login-token@1.0.0 rocketchat:mailer@0.0.1 -rocketchat:mapview@0.0.1 rocketchat:markdown@0.0.2 rocketchat:mentions@0.0.1 rocketchat:mentions-flextab@0.0.1 @@ -191,17 +159,12 @@ rocketchat:message-pin@0.0.1 rocketchat:message-snippet@0.0.1 rocketchat:message-star@0.0.1 rocketchat:migrations@0.0.1 -rocketchat:monitoring@2.30.2_3 rocketchat:nrr@1.0.0 -rocketchat:oauth2-server@2.0.0 -rocketchat:oauth2-server-config@1.0.0 rocketchat:oembed@0.0.1 rocketchat:otr@0.0.1 rocketchat:postcss@1.0.0 rocketchat:push-notifications@0.0.1 rocketchat:reactions@0.0.1 -rocketchat:sandstorm@0.0.1 -rocketchat:slackbridge@0.0.1 rocketchat:slashcommands-archive@0.0.1 rocketchat:slashcommands-asciiarts@0.0.1 rocketchat:slashcommands-create@0.0.1 @@ -219,13 +182,10 @@ rocketchat:slashcommands-topic@0.0.1 rocketchat:slashcommands-unarchive@0.0.1 rocketchat:slider@0.0.1 rocketchat:smarsh-connector@0.0.1 -rocketchat:spotify@0.0.1 -rocketchat:statistics@0.0.1 rocketchat:streamer@0.6.1 rocketchat:theme@0.0.1 rocketchat:tokenpass@0.0.1 rocketchat:tooltip@0.0.1 -rocketchat:tutum@0.0.1 rocketchat:ui@0.1.0 rocketchat:ui-account@0.1.0 rocketchat:ui-admin@0.1.0 @@ -237,9 +197,6 @@ rocketchat:ui-sidenav@0.1.0 rocketchat:ui-vrecord@0.0.1 rocketchat:version@1.0.0 rocketchat:version-check@0.0.1 -rocketchat:videobridge@0.2.0 -rocketchat:webrtc@0.0.1 -rocketchat:wordpress@0.0.1 routepolicy@1.0.12 server-render@0.3.0 service-configuration@1.0.11 @@ -253,8 +210,6 @@ spacebars@1.0.15 spacebars-compiler@1.1.3 srp@1.0.10 standard-minifier-js@2.3.2 -steffo:meteor-accounts-saml@0.0.1 -swydo:graphql@0.0.3 tap:i18n@1.8.2 templating@1.3.2 templating-compiler@1.3.3 diff --git a/example-settings.json b/example-settings.json deleted file mode 100644 index 73a9062d2a997..0000000000000 --- a/example-settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "galaxy.meteor.com": { - "env": { - "MONGO_URL": "mongodb://:@:/", - "MONGO_OPLOG_URL": "mongodb://:@:/?authSource=admin" - } - } -} diff --git a/package-lock.json b/package-lock.json index 6a8fa260185d0..6da7a1398543d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4282,6 +4282,24 @@ "resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz", "integrity": "sha1-PjKNj95BKtR+c44751C00pAENJg=" }, + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", + "requires": { + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -6925,6 +6943,23 @@ "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", "dev": true }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "requires": { + "eventemitter3": "3.1.0", + "follow-redirects": "1.4.1", + "requires-port": "1.0.0" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -10572,6 +10607,11 @@ "resolve-from": "1.0.1" } }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, "resolve": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", diff --git a/package.json b/package.json index c9ba2d133ccc5..28d9be5f6ba58 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,7 @@ "gridfs-stream": "^1.1.1", "he": "^1.1.1", "highlight.js": "^9.12.0", + "http-proxy": "^1.17.0", "iconv-lite": "^0.4.19", "image-size": "^0.6.2", "imap": "^0.8.19", diff --git a/packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js b/packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js index dab8e6de7fa03..080e510e924f4 100644 --- a/packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js +++ b/packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js @@ -282,8 +282,8 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room, userId) { // Always notify Sandstorm if (userOfMention != null) { - RocketChat.Sandstorm.notify(message, [userOfMention._id], - `@${ user.username }: ${ message.msg }`, 'privateMessage'); + // RocketChat.Sandstorm.notify(message, [userOfMention._id], + // `@${ user.username }: ${ message.msg }`, 'privateMessage'); if (canBeNotified(userOfMentionId, 'desktop')) { const duration = settings.desktopNotificationDurations[userOfMention._id]; @@ -452,9 +452,9 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room, userId) { } sendPushNotifications(userIdsToPushNotify, message, room, push_room, push_username, push_message, pushUsernames); - const allUserIdsToNotify = _.unique(userIdsToNotify.concat(userIdsToPushNotify)); - RocketChat.Sandstorm.notify(message, allUserIdsToNotify, - `@${ user.username }: ${ message.msg }`, room.t === 'p' ? 'privateMessage' : 'message'); + // const allUserIdsToNoxtify = _.unique(userIdsToNotify.concat(userIdsToPushNotify)); + // RocketChat.Sandstorm.notify(message, allUserIdsToNotify, + // `@${ user.username }: ${ message.msg }`, room.t === 'p' ? 'privateMessage' : 'message'); } return message; diff --git a/packages/rocketchat-lib/server/models/Rooms.js b/packages/rocketchat-lib/server/models/Rooms.js index cc7806c8e1529..0d85a8b9291e1 100644 --- a/packages/rocketchat-lib/server/models/Rooms.js +++ b/packages/rocketchat-lib/server/models/Rooms.js @@ -126,7 +126,7 @@ class ModelRooms extends RocketChat.models._Base { if (item._room) { return item._room; } - console.log('Empty Room for Subscription', item); + // console.log('Empty Room for Subscription', item); }); data = data.filter(item => item); return this.arrayToCursor(this.processQueryOptionsOnResult(data, options)); @@ -151,7 +151,7 @@ class ModelRooms extends RocketChat.models._Base { if (item._room) { return item._room; } - console.log('Empty Room for Subscription', item); + // console.log('Empty Room for Subscription', item); }); data = data.filter(item => item && item._updatedAt > _updatedAt); return this.arrayToCursor(this.processQueryOptionsOnResult(data, options)); diff --git a/packages/rocketchat-ui-flextab/client/tabs/membersList.js b/packages/rocketchat-ui-flextab/client/tabs/membersList.js index a17fa52ddb79b..5bca490253677 100644 --- a/packages/rocketchat-ui-flextab/client/tabs/membersList.js +++ b/packages/rocketchat-ui-flextab/client/tabs/membersList.js @@ -131,13 +131,13 @@ Template.membersList.helpers({ }, showUserInfo() { - const webrtc = WebRTC.getInstanceByRoomId(this.rid); + // const webrtc = WebRTC.getInstanceByRoomId(this.rid); let videoActive = undefined; - if (webrtc && webrtc.localUrl && webrtc.localUrl.get()) { - videoActive = webrtc.localUrl.get(); - } else if (webrtc && webrtc.remoteItems && webrtc.remoteItems.get() && webrtc.remoteItems.get().length > 0) { - videoActive = webrtc.remoteItems.get(); - } + // if (webrtc && webrtc.localUrl && webrtc.localUrl.get()) { + // videoActive = webrtc.localUrl.get(); + // } else if (webrtc && webrtc.remoteItems && webrtc.remoteItems.get() && webrtc.remoteItems.get().length > 0) { + // videoActive = webrtc.remoteItems.get(); + // } return Template.instance().showDetail.get() && !videoActive; }, diff --git a/packages/rocketchat-ui-message/client/messageBox.js b/packages/rocketchat-ui-message/client/messageBox.js index 27dad816708c3..ec31bd210c91f 100644 --- a/packages/rocketchat-ui-message/client/messageBox.js +++ b/packages/rocketchat-ui-message/client/messageBox.js @@ -126,7 +126,7 @@ const markdownButtons = [ { label: katexSyntax, link: 'https://khan.github.io/KaTeX/function-support.html', - condition: () => RocketChat.katex.katex_enabled() + condition: () => false //RocketChat.katex.katex_enabled() } ]; diff --git a/packages/rocketchat-ui/client/views/app/room.js b/packages/rocketchat-ui/client/views/app/room.js index 7364d45f9aa01..d02bab6e9a32e 100644 --- a/packages/rocketchat-ui/client/views/app/room.js +++ b/packages/rocketchat-ui/client/views/app/room.js @@ -978,21 +978,21 @@ Template.room.onRendered(function() { // salva a data da renderização para exibir alertas de novas mensagens $.data(this.firstNode, 'renderedAt', new Date); - const webrtc = WebRTC.getInstanceByRoomId(template.data._id); - if (webrtc != null) { - Tracker.autorun(() => { - const remoteItems = webrtc.remoteItems.get(); - if (remoteItems && remoteItems.length > 0) { - this.tabBar.setTemplate('membersList'); - this.tabBar.open(); - } - - if (webrtc.localUrl.get() != null) { - this.tabBar.setTemplate('membersList'); - this.tabBar.open(); - } - }); - } + // const webrtc = WebRTC.getInstanceByRoomId(template.data._id); + // if (webrtc != null) { + // Tracker.autorun(() => { + // const remoteItems = webrtc.remoteItems.get(); + // if (remoteItems && remoteItems.length > 0) { + // this.tabBar.setTemplate('membersList'); + // this.tabBar.open(); + // } + + // if (webrtc.localUrl.get() != null) { + // this.tabBar.setTemplate('membersList'); + // this.tabBar.open(); + // } + // }); + // } RocketChat.callbacks.add('streamMessage', (msg) => { if (rid !== msg.rid || msg.editedAt) { return; diff --git a/packages/rocketchat-ui/client/views/app/videoCall/videoCall.js b/packages/rocketchat-ui/client/views/app/videoCall/videoCall.js index 3bc55f9897650..46cadc1391ca7 100644 --- a/packages/rocketchat-ui/client/views/app/videoCall/videoCall.js +++ b/packages/rocketchat-ui/client/views/app/videoCall/videoCall.js @@ -5,7 +5,8 @@ Template.videoCall.onCreated(function() { Template.videoCall.helpers({ videoAvaliable() { - return WebRTC.getInstanceByRoomId(Session.get('openedRoom')) != null; + return false; + // return WebRTC.getInstanceByRoomId(Session.get('openedRoom')) != null; }, videoActive() { const webrtc = WebRTC.getInstanceByRoomId(Session.get('openedRoom')); diff --git a/runlocal b/runlocal new file mode 100755 index 0000000000000..321b01d263e5b --- /dev/null +++ b/runlocal @@ -0,0 +1 @@ +meteor -p 9292 --settings settings-dev.json diff --git a/server/configuration/grant.js b/server/configuration/grant.js index f12a59c300be7..ee7e2ec38305a 100644 --- a/server/configuration/grant.js +++ b/server/configuration/grant.js @@ -1,27 +1,27 @@ -import { Settings } from 'meteor/rocketchat:grant'; +// import { Settings } from 'meteor/rocketchat:grant'; -Settings.add({ - enabled: true, - provider: 'github', - key: '96db2753350cfe8c8ae1', - secret: '546317a561df5e3d350fca9b5500f270b54f3301' -}); +// Settings.add({ +// enabled: true, +// provider: 'github', +// key: '96db2753350cfe8c8ae1', +// secret: '546317a561df5e3d350fca9b5500f270b54f3301' +// }); -Settings.add({ - enabled: true, - provider: 'facebook', - key: '494859557516801', - secret: '5274d3495cebaf01f7e1b90fe1331fba' -}); +// Settings.add({ +// enabled: true, +// provider: 'facebook', +// key: '494859557516801', +// secret: '5274d3495cebaf01f7e1b90fe1331fba' +// }); -Settings.add({ - enabled: true, - provider: 'google', - key: '979285364697-pob8soqche90ng1af0pj9if6ed69jalh.apps.googleusercontent.com', - secret: 'lFWtrtJngtlNBdrAoevwPjZh' -}); +// Settings.add({ +// enabled: true, +// provider: 'google', +// key: '979285364697-pob8soqche90ng1af0pj9if6ed69jalh.apps.googleusercontent.com', +// secret: 'lFWtrtJngtlNBdrAoevwPjZh' +// }); -Settings.apps.add('pwa', { - redirectUrl: 'http://localhost:4200/login?service={provider}&access_token={accessToken}&refresh_token={refreshToken}', - errorUrl: 'http://localhost:4200/login?service={provider}&error={error}' -}); +// Settings.apps.add('pwa', { +// redirectUrl: 'http://localhost:4200/login?service={provider}&access_token={accessToken}&refresh_token={refreshToken}', +// errorUrl: 'http://localhost:4200/login?service={provider}&error={error}' +// }); diff --git a/server/lib/cordova.js b/server/lib/cordova.js index b168db9819ba0..a043630c15449 100644 --- a/server/lib/cordova.js +++ b/server/lib/cordova.js @@ -213,5 +213,5 @@ function configurePush() { } Meteor.startup(function() { - return configurePush(); + // return configurePush(); }); diff --git a/server/publications/room.js b/server/publications/room.js index 2bd181b5b33ec..4ebc8eb1d8d7d 100644 --- a/server/publications/room.js +++ b/server/publications/room.js @@ -41,7 +41,7 @@ const roomMap = (record) => { if (record._room) { return _.pick(record._room, ...Object.keys(fields)); } - console.log('Empty Room for Subscription', record); + // console.log('Empty Room for Subscription', record); return {}; }; diff --git a/server/startup/cron.js b/server/startup/cron.js index 1aa30022f3649..38c60578e3c32 100644 --- a/server/startup/cron.js +++ b/server/startup/cron.js @@ -32,15 +32,15 @@ function cleanupOEmbedCache() { Meteor.startup(function() { return Meteor.defer(function() { - generateStatistics(); - - SyncedCron.add({ - name: 'Generate and save statistics', - schedule(parser) { - return parser.cron(`${ new Date().getMinutes() } * * * *`); - }, - job: generateStatistics - }); + // generateStatistics(); + + // SyncedCron.add({ + // name: 'Generate and save statistics', + // schedule(parser) { + // return parser.cron(`${ new Date().getMinutes() } * * * *`); + // }, + // job: generateStatistics + // }); SyncedCron.add({ name: 'Cleanup OEmbed cache', diff --git a/server/startup/devSSL.js b/server/startup/devSSL.js new file mode 100644 index 0000000000000..5da616320a376 --- /dev/null +++ b/server/startup/devSSL.js @@ -0,0 +1,24 @@ +import httpProxy from 'http-proxy'; +import fs from 'fs'; + +Meteor.startup(() => { + if (Meteor.settings && Meteor.settings.env === 'development' && Meteor.settings && Meteor.settings.localSSL === true) { + proxy = httpProxy.createServer({ + target: { + host: 'localhost', + port: process.env.PORT + }, + ssl: { + key: Assets.getText('localhost.key'), + cert: Assets.getText('localhost.crt'), + }, + ws: true, + xfwd: true + }).listen(9292); + + proxy.on("error", function() { + console.log("HTTP-PROXY NPM MODULE ERROR: " + err); + return; + }); + } +}) \ No newline at end of file diff --git a/settings-dev.json b/settings-dev.json new file mode 100644 index 0000000000000..d7c671bbc2cca --- /dev/null +++ b/settings-dev.json @@ -0,0 +1,4 @@ +{ + "env": "development", + "localSSL": false +}