Merge pull request #1730 from vitorpamplona/claude/add-relay-uri-detection-vOdNR
Add RelayUrlSegment for WebSocket relay URL parsing
This commit is contained in:
+2
@@ -245,6 +245,8 @@ class RichTextParser {
|
|||||||
|
|
||||||
if (videos.contains(word)) return VideoSegment(word)
|
if (videos.contains(word)) return VideoSegment(word)
|
||||||
|
|
||||||
|
if (word.startsWith("ws://", ignoreCase = true) || word.startsWith("wss://", ignoreCase = true)) return RelayUrlSegment(word)
|
||||||
|
|
||||||
if (urls.contains(word)) return LinkSegment(word)
|
if (urls.contains(word)) return LinkSegment(word)
|
||||||
|
|
||||||
if (CustomEmoji.fastMightContainEmoji(word, emojis) && emojis.any { word.contains(it.key) }) return EmojiSegment(word)
|
if (CustomEmoji.fastMightContainEmoji(word, emojis) && emojis.any { word.contains(it.key) }) return EmojiSegment(word)
|
||||||
|
|||||||
+5
@@ -146,6 +146,11 @@ class SchemelessUrlSegment(
|
|||||||
val extras: String?,
|
val extras: String?,
|
||||||
) : Segment(segment)
|
) : Segment(segment)
|
||||||
|
|
||||||
|
@Immutable
|
||||||
|
class RelayUrlSegment(
|
||||||
|
segment: String,
|
||||||
|
) : Segment(segment)
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
class RegularTextSegment(
|
class RegularTextSegment(
|
||||||
segment: String,
|
segment: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user