Add world name to online event if instance isn't private

This commit is contained in:
Natsumi
2021-10-18 01:14:45 +13:00
parent 48ef9457a9
commit 5a7d02cc94
3 changed files with 42 additions and 10 deletions

View File

@@ -368,7 +368,14 @@ import configRepository from './repository/config.js';
)}`;
break;
case 'Online':
text = `<strong>${noty.displayName}</strong> has logged in`;
var locationName = '';
if (noty.worldName) {
locationName = ` to ${this.displayLocation(
noty.location,
noty.worldName
)}`;
}
text = `<strong>${noty.displayName}</strong> has logged in${locationName}`;
break;
case 'Offline':
text = `<strong>${noty.displayName}</strong> has logged out`;