fix: wrong null check in chat links
This commit is contained in:
@@ -141,7 +141,7 @@ object ChatLinks : FirmamentFeature {
|
|||||||
val nextMatch = urlRegex.find(text, index)
|
val nextMatch = urlRegex.find(text, index)
|
||||||
val url = nextMatch?.groupValues[0]
|
val url = nextMatch?.groupValues[0]
|
||||||
val uri = runCatching { url?.let(::URI) }.getOrNull()
|
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)))
|
s.append(Text.literal(text.substring(index, text.length)))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user