Merge pull request #4703 from vector-im/feature/bma/fix_poll_create

Use only non empty option to create a poll
This commit is contained in:
Benoit Marty 2021-12-13 22:56:58 +01:00 committed by GitHub
commit 240d0c0a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,7 +81,7 @@ class CreatePollViewModel @AssistedInject constructor(
_viewEvents.post(CreatePollViewEvents.NotEnoughOptionsError(requiredOptionsCount = MIN_OPTIONS_COUNT))
}
else -> {
room.sendPoll(state.question, state.options)
room.sendPoll(state.question, nonEmptyOptions)
_viewEvents.post(CreatePollViewEvents.Success)
}
}