support Pleroma upload_limit configuration (#2646)
* support Pleroma upload_limit configuration * fix ComposeActivityTest
This commit is contained in:
parent
68c9870b19
commit
17cfa3d9b4
|
@ -70,8 +70,8 @@ class InstanceInfoRepository @Inject constructor(
|
|||
maxPollDuration = instance.configuration?.polls?.maxExpiration ?: instance.pollConfiguration?.maxExpiration,
|
||||
charactersReservedPerUrl = instance.configuration?.statuses?.charactersReservedPerUrl,
|
||||
version = instance.version,
|
||||
videoSizeLimit = instance.configuration?.mediaAttachments?.videoSizeLimit,
|
||||
imageSizeLimit = instance.configuration?.mediaAttachments?.imageSizeLimit,
|
||||
videoSizeLimit = instance.configuration?.mediaAttachments?.videoSizeLimit ?: instance.uploadLimit,
|
||||
imageSizeLimit = instance.configuration?.mediaAttachments?.imageSizeLimit ?: instance.uploadLimit,
|
||||
imageMatrixLimit = instance.configuration?.mediaAttachments?.imageMatrixLimit,
|
||||
maxMediaAttachments = instance.configuration?.statuses?.maxMediaAttachments ?: instance.maxMediaAttachments,
|
||||
maxFields = instance.pleroma?.metadata?.fieldLimits?.maxFields,
|
||||
|
|
|
@ -32,7 +32,8 @@ data class Instance(
|
|||
@SerializedName("poll_limits") val pollConfiguration: PollConfiguration?,
|
||||
val configuration: InstanceConfiguration?,
|
||||
@SerializedName("max_media_attachments") val maxMediaAttachments: Int?,
|
||||
val pleroma: PleromaConfiguration?
|
||||
val pleroma: PleromaConfiguration?,
|
||||
@SerializedName("upload_limit") val uploadLimit: Int?
|
||||
) {
|
||||
override fun hashCode(): Int {
|
||||
return uri.hashCode()
|
||||
|
|
|
@ -465,7 +465,8 @@ class ComposeActivityTest {
|
|||
pollConfiguration = null,
|
||||
configuration = configuration,
|
||||
maxMediaAttachments = null,
|
||||
pleroma = null
|
||||
pleroma = null,
|
||||
uploadLimit = null
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue