Skip to content

Commit

Permalink
invert purgeLinks option in chat config
Browse files Browse the repository at this point in the history
  • Loading branch information
axieum committed May 10, 2024
1 parent b5db418 commit 798432a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 798432a

Please sign in to comment.