DEV: Correct the app-events service injections (#21413)
This commit is contained in:
parent
e4b68dab5c
commit
fdf38335ab
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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`,
|
||||
|
|
Loading…
Reference in New Issue