diff --git a/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/callback/minecraft/ServerMessageCallback.java b/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/callback/minecraft/ServerMessageCallback.java index e5bcd5e..2bd08cc 100644 --- a/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/callback/minecraft/ServerMessageCallback.java +++ b/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/callback/minecraft/ServerMessageCallback.java @@ -184,6 +184,6 @@ public void onTellRawCommandMessage(Text message, ServerCommandSource source) */ private static String replaceLinks(String text, ChatConfig.ChatEntrySchema entry) { - return entry.discord.purgeLinks ? text : URL_PATTERN.matcher(text).replaceAll(" … "); + return entry.discord.purgeLinks ? URL_PATTERN.matcher(text).replaceAll(" … ") : text; } } diff --git a/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/config/ChatConfig.java b/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/config/ChatConfig.java index aee4783..343dc1a 100644 --- a/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/config/ChatConfig.java +++ b/minecord-chat/src/main/java/me/axieum/mcmod/minecord/impl/chat/config/ChatConfig.java @@ -70,9 +70,9 @@ public static class DiscordSchema /** Pre-parsed 'chat' text node. */ public transient TextNode chatNode; - /** True if players are allowed to send links, possibly leading to image previews. */ - @Comment("True if players are allowed to send links, possibly leading to image previews") - public boolean purgeLinks = true; + /** True if links are purged from player messages before being forwarded to Discord. */ + @Comment("True if links are purged from player messages before being forwarded to Discord") + public boolean purgeLinks = false; /** * A player sent an in-game message via the {@code /me} command.