mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	feat: added new filter hook filter:post.getRawPost
This commit is contained in:
		| @@ -85,9 +85,20 @@ SocketPosts.getRawPost = function (socket, pid, callback) { | |||||||
| 			if (postData.deleted) { | 			if (postData.deleted) { | ||||||
| 				return next(new Error('[[error:no-post]]')); | 				return next(new Error('[[error:no-post]]')); | ||||||
| 			} | 			} | ||||||
| 			next(null, postData.content); | 			next(null, postData); | ||||||
| 		}, | 		}, | ||||||
| 	], callback); | 		function (postData, next) { | ||||||
|  | 			plugins.fireHook('filter:post.getRawPost', Object.assign(postData, { | ||||||
|  | 				pid: pid, | ||||||
|  | 			}), next); | ||||||
|  | 		}, | ||||||
|  | 	], function (err, postData) { | ||||||
|  | 		if (err) { | ||||||
|  | 			return callback(err); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		callback(null, postData.content); | ||||||
|  | 	}); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| SocketPosts.getTimestampByIndex = function (socket, data, callback) { | SocketPosts.getTimestampByIndex = function (socket, data, callback) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user