mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	Only send isMain to hook instead of saving to post hash
This commit is contained in:
		| @@ -43,8 +43,7 @@ module.exports = function (Posts) { | ||||
| 					'tid': tid, | ||||
| 					'content': content, | ||||
| 					'timestamp': timestamp, | ||||
| 					'deleted': 0, | ||||
| 					'isMain': isMain | ||||
| 					'deleted': 0 | ||||
| 				}; | ||||
|  | ||||
| 				if (data.toPid) { | ||||
| @@ -108,6 +107,7 @@ module.exports = function (Posts) { | ||||
| 				}); | ||||
| 			}, | ||||
| 			function (postData, next) { | ||||
| 				postData.isMain = isMain; | ||||
| 				plugins.fireHook('action:post.save', _.clone(postData)); | ||||
| 				next(null, postData); | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user