Skip to content

Commit

Permalink
Fix #1150 Receive 422 errors on certain image uploads to Mastodon
Browse files Browse the repository at this point in the history
  • Loading branch information
Xefir committed Apr 20, 2020
1 parent 45bcfb5 commit aa105c6
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 aa105c6

Please sign in to comment.