Skip to content

Commit

Permalink
Merge pull request #1255 from Xefir/1150
Browse files Browse the repository at this point in the history
Fix #1150 Receive 422 errors on certain image uploads to Mastodon
  • Loading branch information
Tlaster authored Apr 20, 2020
2 parents 950c6c0 + aa105c6 commit b52e511
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit b52e511

Please sign in to comment.