Check if media processing finished before sending status (#2458)
* make MastodonApi.createStatus suspending * check if media processing has finished before sending status * add backoff for retrying processed media check
This commit is contained in:
parent
6062ec6b9e
commit
671d2c6a45
4 changed files with 103 additions and 83 deletions
|
|
@ -156,13 +156,18 @@ interface MastodonApi {
|
|||
@Field("description") description: String
|
||||
): Result<Attachment>
|
||||
|
||||
@GET("api/v1/media/{mediaId}")
|
||||
suspend fun getMedia(
|
||||
@Path("mediaId") mediaId: String
|
||||
): Response<MediaUploadResult>
|
||||
|
||||
@POST("api/v1/statuses")
|
||||
fun createStatus(
|
||||
suspend fun createStatus(
|
||||
@Header("Authorization") auth: String,
|
||||
@Header(DOMAIN_HEADER) domain: String,
|
||||
@Header("Idempotency-Key") idempotencyKey: String,
|
||||
@Body status: NewStatus
|
||||
): Call<Status>
|
||||
): Result<Status>
|
||||
|
||||
@GET("api/v1/statuses/{id}")
|
||||
fun status(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue