-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the update check not working #17809
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ import os from 'os'; | |
|
||
import { HTTP } from 'meteor/http'; | ||
import { check, Match } from 'meteor/check'; | ||
import { MongoInternals } from 'meteor/mongo'; | ||
|
||
import { Settings } from '../../../models'; | ||
import { Info } from '../../../utils'; | ||
|
@@ -11,14 +10,11 @@ import { getWorkspaceAccessToken } from '../../../cloud/server'; | |
export default () => { | ||
try { | ||
const uniqueID = Settings.findOne('uniqueID'); | ||
const { _oplogHandle } = MongoInternals.defaultRemoteCollectionDriver().mongo; | ||
const oplogEnabled = _oplogHandle && _oplogHandle.onOplogEntry; | ||
|
||
const params = { | ||
uniqueId: uniqueID.value, | ||
installedAt: uniqueID.createdAt, | ||
installedAt: uniqueID.createdAt.toJSON(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is another reason why the previous version won't work. Sadly, meteor has an issue parameterizing date objects. |
||
version: Info.version, | ||
oplogEnabled, | ||
osType: os.type(), | ||
osPlatform: os.platform(), | ||
osArch: os.arch(), | ||
|
@@ -40,7 +36,11 @@ export default () => { | |
}); | ||
|
||
check(data, Match.ObjectIncluding({ | ||
versions: [String], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is one reason why the previous version won't work. |
||
versions: [Match.ObjectIncluding({ | ||
version: Match.Optional(String), | ||
security: Match.Optional(Boolean), | ||
infoUrl: Match.Optional(String), | ||
})], | ||
alerts: Match.Optional([Match.ObjectIncluding({ | ||
id: Match.Optional(String), | ||
title: Match.Optional(String), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed because otherwise with a dot its inserting and nesting. So like in the version one it was nesting like: