diff options
author | Linnea Gräf <nea@nea.moe> | 2025-06-29 13:19:16 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-06-29 13:21:25 +0200 |
commit | f8cbaae1cad05c2a5e28680436e8a1b74da9dd6c (patch) | |
tree | 3fb078e3d0ed968e0717ec23c755fac61073876d | |
parent | 0af329c17ac02b69a3b52135726f496597c23f08 (diff) | |
download | Firmament-f8cbaae1cad05c2a5e28680436e8a1b74da9dd6c.tar.gz Firmament-f8cbaae1cad05c2a5e28680436e8a1b74da9dd6c.tar.bz2 Firmament-f8cbaae1cad05c2a5e28680436e8a1b74da9dd6c.zip |
fix: wrong null check in chat links
-rw-r--r-- | src/main/kotlin/features/chat/ChatLinks.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/features/chat/ChatLinks.kt b/src/main/kotlin/features/chat/ChatLinks.kt index 869fe62..1fb12e1 100644 --- a/src/main/kotlin/features/chat/ChatLinks.kt +++ b/src/main/kotlin/features/chat/ChatLinks.kt @@ -141,7 +141,7 @@ object ChatLinks : FirmamentFeature { val nextMatch = urlRegex.find(text, index) val url = nextMatch?.groupValues[0] val uri = runCatching { url?.let(::URI) }.getOrNull() - if (nextMatch == null || url == null) { + if (nextMatch == null || url == null || uri == null) { s.append(Text.literal(text.substring(index, text.length))) break } |