fix scheduling posts (#4392)
Mastodon returns different reponses when posting normally and when scheduling. This was previously ignored silently, but Moshi is more correct than Gson and fails, which causes the `SendStatusService` to retry sending forever and a lot of posts are scheduled. Mastodon should actually ignore multiple attempts at scheduling the same post, but doesn't so I filed this https://github.com/mastodon/mastodon/issues/30039 cc @cbeyls
This commit is contained in:
parent
f2ffba1679
commit
c55d79562c
3 changed files with 31 additions and 12 deletions
|
|
@ -199,6 +199,14 @@ interface MastodonApi {
|
|||
@Body status: NewStatus
|
||||
): NetworkResult<Status>
|
||||
|
||||
@POST("api/v1/statuses")
|
||||
suspend fun createScheduledStatus(
|
||||
@Header("Authorization") auth: String,
|
||||
@Header(DOMAIN_HEADER) domain: String,
|
||||
@Header("Idempotency-Key") idempotencyKey: String,
|
||||
@Body status: NewStatus
|
||||
): NetworkResult<ScheduledStatus>
|
||||
|
||||
@GET("api/v1/statuses/{id}")
|
||||
suspend fun status(@Path("id") statusId: String): NetworkResult<Status>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue