Also filter out using the canonical alias

This commit is contained in:
Benoit Marty 2021-03-08 13:59:44 +01:00
parent 85b1edc6d2
commit 98a89564e1

View file

@ -203,7 +203,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(
val newPublicRooms = data.chunk.orEmpty()
.filter {
showAllRooms
|| "${it.name} ${it.topic}".toLowerCase(Locale.ROOT)
|| "${it.name.orEmpty()} ${it.topic.orEmpty()} ${it.canonicalAlias.orEmpty()}".toLowerCase(Locale.ROOT)
.let { str ->
explicitContentTerms.all { term -> term !in str }
}