diff --git a/src/main/java/org/thoughtcrime/securesms/util/Linkifier.java b/src/main/java/org/thoughtcrime/securesms/util/Linkifier.java index f94bb475e..0a82753b0 100644 --- a/src/main/java/org/thoughtcrime/securesms/util/Linkifier.java +++ b/src/main/java/org/thoughtcrime/securesms/util/Linkifier.java @@ -41,7 +41,7 @@ public class Linkifier { replaceURLSpan(messageBody); // replace URLSpan so that it is not removed on the next addLinks() call } - if (Linkify.addLinks(messageBody, PHONE_PATTERN, "tel:", (s, start, end) -> s.subSequence(start, end).toString().replaceAll("[\\- \\.]", "").length() >= 5, null)) { + if (Linkify.addLinks(messageBody, PHONE_PATTERN, "tel:", Linkify.sPhoneNumberMatchFilter, Linkify.sPhoneNumberTransformFilter)) { replaceURLSpan(messageBody); // replace URLSpan so that it is not removed on the next addLinks() call }