mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Allow 1:1 polls and raise character limit.
This commit is contained in:
committed by
jeffrey-signal
parent
fd635542c0
commit
f7d87f3436
@@ -29,6 +29,7 @@ import org.whispersystems.signalservice.internal.util.Util
|
||||
*/
|
||||
object EnvelopeContentValidator {
|
||||
|
||||
private const val MAX_POLL_QUESTION_CHARACTER_LENGTH = 200
|
||||
private const val MAX_POLL_CHARACTER_LENGTH = 100
|
||||
private const val MIN_POLL_OPTIONS = 2
|
||||
|
||||
@@ -167,7 +168,7 @@ object EnvelopeContentValidator {
|
||||
}
|
||||
|
||||
private fun DataMessage.PollCreate.hasInvalidPollQuestion(): Boolean {
|
||||
return this.question.isNullOrBlank() || this.question.length > MAX_POLL_CHARACTER_LENGTH
|
||||
return this.question.isNullOrBlank() || this.question.length > MAX_POLL_QUESTION_CHARACTER_LENGTH
|
||||
}
|
||||
|
||||
private fun DataMessage.PollCreate.hasInvalidPollOptions(): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user