DEV: Correct the app-events service injections (#21413)

This commit is contained in:
Jarek Radosz 2023-05-08 10:48:56 +02:00 committed by GitHub
parent e4b68dab5c
commit fdf38335ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@ RestModel.reopenClass({
args.siteSettings = owner.lookup("service:site-settings");
}
if (!args.appEvents) {
args.appEvents = owner.lookup("service:appEvents");
args.appEvents = owner.lookup("service:app-events");
}
args.__munge = this.munge;

View File

@ -326,7 +326,7 @@ export function acceptance(name, optionsOrCallback) {
updateCurrentUser(userChanges);
}
User.current().appEvents = getOwner(this).lookup("service:appEvents");
User.current().appEvents = getOwner(this).lookup("service:app-events");
User.current().trackStatus();
}

View File

@ -19,7 +19,7 @@ export default {
initialize(container) {
this.chatService = container.lookup("service:chat");
this.siteSettings = container.lookup("service:site-settings");
this.appEvents = container.lookup("service:appEvents");
this.appEvents = container.lookup("service:app-events");
this.appEvents.on("discourse:focus-changed", this, "_handleFocusChanged");
if (!this.chatService.userCanChat) {

View File

@ -66,7 +66,7 @@ module("Discourse Chat | Component | chat-composer-uploads", function (hooks) {
`);
const done = assert.async();
this.appEvents = this.container.lookup("service:appEvents");
this.appEvents = this.container.lookup("service:app-events");
this.appEvents.on(
"upload-mixin:chat-composer-uploader:upload-success",
(fileName, upload) => {
@ -116,7 +116,7 @@ module("Discourse Chat | Component | chat-composer-uploads", function (hooks) {
const image = createFile("avatar.png");
const done = assert.async();
this.appEvents = this.container.lookup("service:appEvents");
this.appEvents = this.container.lookup("service:app-events");
this.appEvents.on(
`upload-mixin:chat-composer-uploader:upload-cancelled`,