mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-27 17:16:14 +01:00 
			
		
		
		
	refactor: don't use composer directly, use the post hook
This commit is contained in:
		| @@ -1,10 +1,10 @@ | |||||||
| 'use strict'; | 'use strict'; | ||||||
|  |  | ||||||
| define('quickreply', [ | define('quickreply', [ | ||||||
| 	'components', 'composer', 'composer/autocomplete', 'api', | 	'components', 'composer/autocomplete', 'api', | ||||||
| 	'alerts', 'uploadHelpers', 'mousetrap', 'storage', 'hooks', | 	'alerts', 'uploadHelpers', 'mousetrap', 'storage', 'hooks', | ||||||
| ], function ( | ], function ( | ||||||
| 	components, composer, autocomplete, api, | 	components, autocomplete, api, | ||||||
| 	alerts, uploadHelpers, mousetrap, storage, hooks | 	alerts, uploadHelpers, mousetrap, storage, hooks | ||||||
| ) { | ) { | ||||||
| 	const QuickReply = {}; | 	const QuickReply = {}; | ||||||
| @@ -113,7 +113,7 @@ define('quickreply', [ | |||||||
| 			e.preventDefault(); | 			e.preventDefault(); | ||||||
| 			storage.removeItem(qrDraftId); | 			storage.removeItem(qrDraftId); | ||||||
| 			const textEl = components.get('topic/quickreply/text'); | 			const textEl = components.get('topic/quickreply/text'); | ||||||
| 			composer.newReply({ | 			hooks.fire('action:composer.post.new', { | ||||||
| 				tid: ajaxify.data.tid, | 				tid: ajaxify.data.tid, | ||||||
| 				title: ajaxify.data.titleRaw, | 				title: ajaxify.data.titleRaw, | ||||||
| 				body: textEl.val(), | 				body: textEl.val(), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user