feat: #11897, show guest handles in post queue and after using POST /compose

isekai-main
Barış Soner Uşaklı 1 year ago
parent 1d44b004ab
commit 76fde8efd7

@ -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 || ''));
}

Loading…
Cancel
Save