mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-31 17:04:59 +01:00
Merge pull request #1255 from Xefir/1150
Fix #1150 Receive 422 errors on certain image uploads to Mastodon
This commit is contained in:
commit
b52e511b9a
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user