Merge pull request #1255 from Xefir/1150

Fix #1150 Receive 422 errors on certain image uploads to Mastodon
This commit is contained in:
Tlaster 2020-04-20 18:17:10 +08:00 committed by GitHub
commit b52e511b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

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
}
}