mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Allow 1:1 polls and raise character limit.
This commit is contained in:
committed by
jeffrey-signal
parent
fd635542c0
commit
f7d87f3436
@@ -135,10 +135,6 @@ object ExportSkips {
|
||||
return log(sentTimestamp, "Poll option was invalid.")
|
||||
}
|
||||
|
||||
fun pollNotInGroupChat(sentTimestamp: Long): String {
|
||||
return log(sentTimestamp, "Poll was not in a group chat.")
|
||||
}
|
||||
|
||||
fun pinMessageIsInvalid(sentTimestamp: Long): String {
|
||||
return log(sentTimestamp, "Pin message update was invalid.")
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ private val TAG = Log.tag(ChatItemArchiveExporter::class.java)
|
||||
private val MAX_INLINED_BODY_SIZE = 128.kibiBytes.bytes.toInt()
|
||||
private val MAX_INLINED_BODY_SIZE_WITH_LONG_ATTACHMENT_POINTER = 2.kibiBytes.bytes.toInt()
|
||||
private val MAX_INLINED_QUOTE_BODY_SIZE = 2.kibiBytes.bytes.toInt()
|
||||
private const val MAX_POLL_QUESTION_CHARACTER_LENGTH = 200
|
||||
private const val MAX_POLL_CHARACTER_LENGTH = 100
|
||||
private const val MAX_POLL_OPTIONS = 10
|
||||
|
||||
@@ -398,13 +399,8 @@ class ChatItemArchiveExporter(
|
||||
}
|
||||
|
||||
extraData.pollsById[record.id] != null -> {
|
||||
if (exportState.threadIdToRecipientId[builder.chatId] !in exportState.groupRecipientIds) {
|
||||
Log.w(TAG, ExportSkips.pollNotInGroupChat(record.dateSent))
|
||||
continue
|
||||
}
|
||||
|
||||
val poll = extraData.pollsById[record.id]!!
|
||||
if (poll.question.isEmpty() || poll.question.length > MAX_POLL_CHARACTER_LENGTH) {
|
||||
if (poll.question.isEmpty() || poll.question.length > MAX_POLL_QUESTION_CHARACTER_LENGTH) {
|
||||
Log.w(TAG, ExportSkips.invalidPollQuestion(record.dateSent))
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user