mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 11:44:44 +08:00
FIX: Correctly save group invites (stable) (#25567)
regressed in 19b86e7ea2
This commit is contained in:
parent
39dffcb657
commit
07fb62331c
|
@ -54,7 +54,7 @@ export default Component.extend(bufferedProperty("invite"), {
|
|||
moment()
|
||||
.add(this.siteSettings.invite_expiry_days, "days")
|
||||
.format(FORMAT),
|
||||
groupIds: this.model.invite?.groupIds,
|
||||
groupIds: this.model.groupIds ?? this.model.invite?.groupIds,
|
||||
topicId: this.model.invite?.topicId,
|
||||
topicTitle: this.model.invite?.topicTitle,
|
||||
});
|
||||
|
|
|
@ -36,7 +36,7 @@ export default DiscourseRoute.extend({
|
|||
showInviteModal() {
|
||||
const group = this.modelFor("group");
|
||||
this.modal.show(CreateInvite, {
|
||||
model: { invite: { groupIds: [group.id] } },
|
||||
model: { groupIds: [group.id] },
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -262,6 +262,8 @@ acceptance(
|
|||
},
|
||||
]);
|
||||
});
|
||||
|
||||
server.post("/invites", () => helper.response({}));
|
||||
});
|
||||
|
||||
test("shows correct saved data in form", async function (assert) {
|
||||
|
@ -281,6 +283,8 @@ acceptance(
|
|||
await visit("/g/discourse");
|
||||
await click(".group-members-invite");
|
||||
assert.dom(".invite-to-groups .formatted-selection").hasText("Discourse");
|
||||
|
||||
await click(".save-invite");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user