mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:37:44 +08:00
FIX: ensures users can open channel invites (#24067)
We were incorrectly generating URLs with message id even when it was not provided, resulting in a route ending with "undefined", which was causing an error. This commit also uses this opportunity to: - move `invite_users` into a proper controller inside the API namespace - refactors the code into a service: `Chat::InviteUsersToChannel`
This commit is contained in:
@ -91,7 +91,7 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
|
||||
.dom(".mention-without-membership-notice__body__link")
|
||||
.hasText(I18n.t("chat.mention_warning.invite"));
|
||||
|
||||
pretender.put(`/chat/${this.channel.id}/invite`, () => {
|
||||
pretender.post(`/chat/api/channels/${this.channel.id}/invites`, () => {
|
||||
return [200, { "Content-Type": "application/json" }, {}];
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user