diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/Emoji.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/Emoji.kt index 9706651d57..5ab5d1e245 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/Emoji.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/Emoji.kt @@ -35,7 +35,7 @@ fun String.containsOnlyEmojis(): Boolean { m = matcher.toMatchResult() // Many non-"emoji" characters are pictographics. We only want to identify this specific range // https://en.wikipedia.org/wiki/Miscellaneous_Symbols_and_Pictographs - val isEmoji = m!!.grapheme().type == EMOJI || (m.grapheme().type == PICTOGRAPHIC && m.group() in "🌍".."🗺") + val isEmoji = m!!.grapheme().type == EMOJI || m.grapheme().type == PICTOGRAPHIC && m.group() in "🌍".."🗺" contiguous = isEmoji and (m.start() == previous) previous = m.end() }