test for empty string in mentions

This commit is contained in:
David Kaspar 2024-11-07 09:24:30 +00:00
parent 7146838f63
commit abf6cc00ae

View File

@ -222,7 +222,10 @@ open class NewPostViewModel : ViewModel() {
if (replyNote.event !is CommunityDefinitionEvent) {
replyNote.author?.let { replyUser ->
val currentMentions =
(replyNote.event as? TextNoteEvent)?.mentions()?.map { LocalCache.getOrCreateUser(it) }
(replyNote.event as? TextNoteEvent)
?.mentions()
?.filter { it.isNotEmpty() }
?.map { LocalCache.getOrCreateUser(it) }
?: emptyList()
if (currentMentions.contains(replyUser)) {