Skip to content
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

Merged
merged 3 commits into from
May 3, 2018

Conversation

graywolf336
Copy link
Contributor

Now it is. :)

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10611 April 27, 2018 20:45 Inactive
@@ -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 }`,
Copy link
Member

@sampaiodiego sampaiodiego Apr 27, 2018

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 }`),

Copy link
Contributor Author

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.

Copy link
Member

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() });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: recieved -> received

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10611 April 27, 2018 20:53 Inactive
@graywolf336 graywolf336 added this to the 0.64.1 milestone Apr 28, 2018
@graywolf336
Copy link
Contributor Author

@rodrigok why did this not make it into the official v64 release?

@rodrigok
Copy link
Member

rodrigok commented May 3, 2018

@graywolf336 IDK, maybe it wasn't pointing to the milestone and project?

@rodrigok rodrigok merged commit 7ba58f4 into develop May 3, 2018
@rodrigok rodrigok deleted the regression/fix-multi-instance-apps branch May 3, 2018 12:04
@rodrigok rodrigok mentioned this pull request May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants