Use real name in agent message box, #3654

Ylian Saint-Hilaire committed Feb 15, 2022 at 11:10 UTC 1b49f64498300388e64bbe993a6059866dd3f5ec
1 file changed +3
agents/meshcore.js
+3
@@ -1076,6 +1076,8 @@ function handleServerCommand(data) {
1076 break;
1077 }
1078 case 'messagebox': {
1079 + sendConsoleText(JSON.stringify(data));
1080 +
1081 // Display a message box
1082 if (data.title && data.msg)
1083 {
@@ -1095,6 +1097,7 @@ function handleServerCommand(data) {
1097 ipr.title = data.title;
1098 ipr.message = data.msg;
1099 ipr.username = data.username;
1100 + if (data.realname && (data.realname != '')) { ipr.username = data.realname; }
1101 global._clientmessage = ipr.then(function (img)
1102 {
1103 this.messagebox = require('win-dialog').create(this.title, this.message, this.username, { timeout: 120000, b64Image: img.split(',').pop(), background: color_options.background, foreground: color_options.foreground });