You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -544,17 +544,27 @@ private fun AnnotatedString.Builder.appendLink(link: Element) {
544
544
pop()
545
545
}
546
546
isPermalinkData.RoomEmailInviteLink-> {
547
-
appendInlineContent(CHIP_ID, link.ownText())
547
+
safeAppendInlineContent(CHIP_ID, link.ownText())
548
548
}
549
549
isPermalinkData.RoomLink-> {
550
-
appendInlineContent(CHIP_ID, link.ownText())
550
+
safeAppendInlineContent(CHIP_ID, link.ownText())
551
551
}
552
552
isPermalinkData.UserLink-> {
553
-
appendInlineContent(CHIP_ID, link.ownText())
553
+
safeAppendInlineContent(CHIP_ID, link.ownText())
554
554
}
555
555
}
556
556
}
557
557
558
+
fun AnnotatedString.Builder.safeAppendInlineContent(chipId:String, ownText:String) {
559
+
if (ownText.isEmpty()) {
560
+
// alternateText cannot be empty and default parameter value is private,
0 commit comments