Minor messenger username fix.

Ylian Saint-Hilaire committed Jan 27, 2021 at 15:35 UTC ddcddb71055c7d7aa76350f4ffbb9ee0d4afea4e
1 file changed +2 -2
webserver.js
+2 -2
@@ -2759,8 +2759,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2759 if (idSplit.length == 7) {
2760 const user = obj.users[idSplit[4] + '/' + idSplit[5] + '/' + idSplit[6]];
2761 if (user != null) {
2762 - if (domain.meshmessengertitle.indexOf('{0}') >= 0) { options.username = encodeURIComponent(user.realname ? user.realname : user._id.split('/')[2]).replace(/'/g, '%27'); }
2763 - if (domain.meshmessengertitle.indexOf('{1}') >= 0) { options.userid = encodeURIComponent(user._id.split('/')[2]).replace(/'/g, '%27'); }
2762 + if (domain.meshmessengertitle.indexOf('{0}') >= 0) { options.username = encodeURIComponent(user.realname ? user.realname : user.name).replace(/'/g, '%27'); }
2763 + if (domain.meshmessengertitle.indexOf('{1}') >= 0) { options.userid = encodeURIComponent(user.name); }
2764 }
2765 }
2766 }