-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Regression: Updating an App on multi-instance servers wasn't working #10611
Conversation
@@ -70,7 +70,7 @@ RocketChat.API = { | |||
|
|||
return new Promise(function _jqueryFormDataPromise(resolve, reject) { | |||
jQuery.ajax({ | |||
url: `${ Meteor.absoluteUrl() }api/${ endpoint }${ query }`, | |||
url: `${ window.location.origin }/api/${ endpoint }${ query }`, |
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.
why not use?
url: Meteor.absoluteUrl(`/api/${ endpoint }${ query }`),
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.
Because the Meteor.absoluteUrl
uses the configured url and when you are testing against a specific instance, it calls another instance. We currently don't use these utilities, so we can improve them later.
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.
oh.. we don't take care of a case like this in anywhere.. we always assume all instances are at same domain.
@@ -53,6 +54,15 @@ export class AppServerListener { | |||
this.clientStreamer.emit(AppEvents.APP_SETTING_UPDATED, { appId }); | |||
} | |||
|
|||
async onAppUpdated(appId) { | |||
this.recieved.set(`${ AppEvents.APP_UPDATED }_${ appId }`, { appId, when: new Date() }); |
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.
typo: recieved
-> received
@rodrigok why did this not make it into the official v64 release? |
@graywolf336 IDK, maybe it wasn't pointing to the milestone and project? |
Now it is. :)