fix: guest handles to user displayname as well

This commit is contained in:
Barış Soner Uşaklı
2020-11-29 15:38:02 -05:00
parent f6765ec74d
commit 5a137a0dd6
2 changed files with 5 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ module.exports = function (Topics) {
// Username override for guests, if enabled
if (meta.config.allowGuestHandles && postObj.uid === 0 && postObj.handle) {
postObj.user.username = validator.escape(String(postObj.handle));
postObj.user.displayname = postObj.user.username;
}
}
});