contents has been renamed to `hide_notification_contents`
- Mastodon API: Added `pleroma.metadata.post_formats` to /api/v1/instance
- Mastodon API (legacy): Allow query parameters for `/api/v1/domain_blocks`, e.g. `/api/v1/domain_blocks?domain=badposters.zone`
+- **Breaking:** Pleroma API: `/api/pleroma/captcha` responses now include `seconds_valid` with an integer value.
</details>
<details>
* Authentication: not required
* Params: none
* Response: Provider specific JSON, the only guaranteed parameter is `type`
-* Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint"}`
+* Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint", seconds_valid: 300}`
## `/api/pleroma/delete_account`
### Delete an account
type: :kocaptcha,
token: json_resp["token"],
url: endpoint <> json_resp["url"],
- answer_data: json_resp["md5"]
+ answer_data: json_resp["md5"],
+ seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid])
}
end
end
type: :native,
token: token(),
url: "data:image/png;base64," <> Base.encode64(img_binary),
- answer_data: answer_data
+ answer_data: answer_data,
+ seconds_valid: Pleroma.Config.get([Pleroma.Captcha, :seconds_valid])
}
end
end
answer_data: answer,
token: ^token,
url: ^url,
- type: :kocaptcha
+ type: :kocaptcha,
+ seconds_valid: 300
} = new
assert Kocaptcha.validate(token, "7oEy8c", answer) == :ok
answer_data: answer,
token: token,
type: :native,
- url: "data:image/png;base64," <> _
+ url: "data:image/png;base64," <> _,
+ seconds_valid: 300
} = new
assert is_binary(answer)
type: :mock,
token: "afa1815e14e29355e6c8f6b143a39fa2",
answer_data: @solution,
- url: "https://example.org/captcha.png"
+ url: "https://example.org/captcha.png",
+ seconds_valid: 300
}
@impl Service