Fix small formatting issue

This commit is contained in:
Benoit Marty 2020-12-20 20:28:40 +01:00
parent 621c6c8773
commit 9da3eec64f
1 changed files with 5 additions and 3 deletions

View File

@ -32,9 +32,11 @@ internal class UrlsExtractor @Inject constructor() {
return event.takeIf { it.getClearType() == EventType.MESSAGE }
?.getClearContent()
?.toModel<MessageContent>()
?.takeIf { it.msgType == MessageType.MSGTYPE_TEXT ||
it.msgType == MessageType.MSGTYPE_NOTICE ||
it.msgType == MessageType.MSGTYPE_EMOTE }
?.takeIf {
it.msgType == MessageType.MSGTYPE_TEXT
|| it.msgType == MessageType.MSGTYPE_NOTICE
|| it.msgType == MessageType.MSGTYPE_EMOTE
}
?.body
?.let { urlRegex.findAll(it) }
?.map { it.value }