1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-01-19 03:29:58 +01:00

Fix #1150 Receive 422 errors on certain image uploads to Mastodon

This commit is contained in:
Michel Roux 2020-04-20 10:56:58 +02:00
parent 45bcfb5bcd
commit aa105c6d2b

View File

@ -71,6 +71,16 @@ fun AccountDetails.getMediaSizeLimit(@MediaCategory mediaCategory: String? = nul
}
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
}
AccountType.MASTODON -> {
val imageLimit = AccountExtras.ImageLimit().apply {
maxSizeSync = 8 * 1024 * 1024
maxSizeAsync = 8 * 1024 * 1024
maxHeight = 1280
maxWidth = 1280
}
val videoLimit = AccountExtras.VideoLimit.twitterDefault()
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
}
else -> return null
}
}