Remove unneeded sanitization in webhook names (#5311)

Regression from 384f63bf92
This commit is contained in:
Josh Roy 2023-04-13 02:15:48 -04:00 committed by GitHub
parent 384f63bf92
commit 3a737480ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -280,11 +280,11 @@ public class JDADiscordService implements DiscordService, IEssentialsModule {
final String avatarUrl = DiscordUtil.getAvatarUrl(this, player);
final String formattedName = MessageUtil.formatMessage(getSettings().getMcToDiscordNameFormat(player),
MessageUtil.sanitizeDiscordMarkdown(player.getName()),
MessageUtil.sanitizeDiscordMarkdown(player.getDisplayName()),
MessageUtil.sanitizeDiscordMarkdown(getPlugin().getEss().getSettings().getWorldAlias(player.getWorld().getName())),
MessageUtil.sanitizeDiscordMarkdown(FormatUtil.stripEssentialsFormat(getPlugin().getEss().getPermissionsHandler().getPrefix(player))),
MessageUtil.sanitizeDiscordMarkdown(FormatUtil.stripEssentialsFormat(getPlugin().getEss().getPermissionsHandler().getSuffix(player))),
player.getName(),
player.getDisplayName(),
getPlugin().getEss().getSettings().getWorldAlias(player.getWorld().getName()),
FormatUtil.stripEssentialsFormat(getPlugin().getEss().getPermissionsHandler().getPrefix(player)),
FormatUtil.stripEssentialsFormat(getPlugin().getEss().getPermissionsHandler().getSuffix(player)),
guild.getMember(jda.getSelfUser()).getEffectiveName());
DiscordUtil.dispatchDiscordMessage(this, MessageType.DefaultTypes.CHAT, formattedMessage, user.isAuthorized("essentials.discord.ping"), avatarUrl, formattedName, player.getUniqueId());

View File

@ -273,11 +273,11 @@ public class BukkitListener implements Listener {
}
name = MessageUtil.formatMessage(jda.getSettings().getMcToDiscordNameFormat(player),
MessageUtil.sanitizeDiscordMarkdown(player.getName()),
MessageUtil.sanitizeDiscordMarkdown(player.getDisplayName()),
MessageUtil.sanitizeDiscordMarkdown(jda.getPlugin().getEss().getSettings().getWorldAlias(player.getWorld().getName())),
MessageUtil.sanitizeDiscordMarkdown(FormatUtil.stripEssentialsFormat(jda.getPlugin().getEss().getPermissionsHandler().getPrefix(player))),
MessageUtil.sanitizeDiscordMarkdown(FormatUtil.stripEssentialsFormat(jda.getPlugin().getEss().getPermissionsHandler().getSuffix(player))),
player.getName(),
player.getDisplayName(),
jda.getPlugin().getEss().getSettings().getWorldAlias(player.getWorld().getName()),
FormatUtil.stripEssentialsFormat(jda.getPlugin().getEss().getPermissionsHandler().getPrefix(player)),
FormatUtil.stripEssentialsFormat(jda.getPlugin().getEss().getPermissionsHandler().getSuffix(player)),
jda.getGuild().getMember(jda.getJda().getSelfUser()).getEffectiveName());
uuid = player.getUniqueId();