mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: compose a new pre-filled message via URL
This commit is contained in:
@ -12,7 +12,7 @@ export default Ember.Mixin.create({
|
||||
});
|
||||
},
|
||||
|
||||
openComposerWithParams(controller, topicTitle, topicBody, topicCategoryId, topicCategory) {
|
||||
openComposerWithTopicParams(controller, topicTitle, topicBody, topicCategoryId, topicCategory) {
|
||||
const Composer = require('discourse/models/composer').default;
|
||||
this.controllerFor('composer').open({
|
||||
action: Composer.CREATE_TOPIC,
|
||||
@ -23,6 +23,18 @@ export default Ember.Mixin.create({
|
||||
draftKey: controller.get('model.draft_key'),
|
||||
draftSequence: controller.get('model.draft_sequence')
|
||||
});
|
||||
},
|
||||
|
||||
openComposerWithMessageParams(usernames, topicTitle, topicBody) {
|
||||
const Composer = require('discourse/models/composer').default;
|
||||
this.controllerFor('composer').open({
|
||||
action: Composer.PRIVATE_MESSAGE,
|
||||
usernames,
|
||||
topicTitle,
|
||||
topicBody,
|
||||
archetypeId: 'private_message',
|
||||
draftKey: 'new_private_message'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user