Fixed regexp used in chat message to detect email or SIP URI
This commit is contained in:
parent
2f321a9dee
commit
3deef0c1ed
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ class ChatMessageData(val chatMessage: ChatMessage) : GenericContactData(chatMes
|
||||||
LinkifyCompat.addLinks(spannable, Linkify.WEB_URLS or Linkify.PHONE_NUMBERS)
|
LinkifyCompat.addLinks(spannable, Linkify.WEB_URLS or Linkify.PHONE_NUMBERS)
|
||||||
text.value = PatternClickableSpan()
|
text.value = PatternClickableSpan()
|
||||||
.add(
|
.add(
|
||||||
Pattern.compile("((sips?):)?([^@]+)(?:@([^ ]+))?"),
|
Pattern.compile("(?:<?sips?:)?[^@]+(?:@([^ ]+))+"),
|
||||||
object : PatternClickableSpan.SpannableClickedListener {
|
object : PatternClickableSpan.SpannableClickedListener {
|
||||||
override fun onSpanClicked(text: String) {
|
override fun onSpanClicked(text: String) {
|
||||||
Log.i("[Chat Message Data] Clicked on SIP URI: $text")
|
Log.i("[Chat Message Data] Clicked on SIP URI: $text")
|
||||||
|
|
Loading…
Reference in a new issue