mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-30 18:46:01 +01:00 
			
		
		
		
	feat: #11897, show guest handles in post queue and after using POST /compose
This commit is contained in:
		| @@ -46,6 +46,7 @@ exports.post = async function (req, res) { | ||||
| 		req: req, | ||||
| 		timestamp: Date.now(), | ||||
| 		content: body.content, | ||||
| 		handle: body.handle, | ||||
| 		fromQueue: false, | ||||
| 	}; | ||||
| 	req.body.noscript = 'true'; | ||||
|   | ||||
| @@ -38,6 +38,11 @@ module.exports = function (Posts) { | ||||
| 			postData.forEach((postData, index) => { | ||||
| 				if (postData) { | ||||
| 					postData.user = userData[index]; | ||||
| 					if (postData.user.uid === 0 && postData.data.handle) { | ||||
| 						postData.user.username = validator.escape(String(postData.data.handle)); | ||||
| 						postData.user.displayname = postData.user.username; | ||||
| 						postData.user.fullname = postData.user.username; | ||||
| 					} | ||||
| 					postData.data.rawContent = validator.escape(String(postData.data.content)); | ||||
| 					postData.data.title = validator.escape(String(postData.data.title || '')); | ||||
| 				} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user