Implement optional notifications muting for account muting (#1856)
This commit is contained in:
parent
5a4fc41f76
commit
b3b4794a2b
17 changed files with 240 additions and 49 deletions
|
|
@ -317,9 +317,11 @@ interface MastodonApi {
|
|||
@Path("id") accountId: String
|
||||
): Call<Relationship>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("api/v1/accounts/{id}/mute")
|
||||
fun muteAccount(
|
||||
@Path("id") accountId: String
|
||||
@Path("id") accountId: String,
|
||||
@Field("notifications") notifications: Boolean
|
||||
): Call<Relationship>
|
||||
|
||||
@POST("api/v1/accounts/{id}/unmute")
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ interface TimelineCases {
|
|||
fun reblog(status: Status, reblog: Boolean): Single<Status>
|
||||
fun favourite(status: Status, favourite: Boolean): Single<Status>
|
||||
fun bookmark(status: Status, bookmark: Boolean): Single<Status>
|
||||
fun mute(id: String)
|
||||
fun mute(id: String, notifications: Boolean)
|
||||
fun block(id: String)
|
||||
fun delete(id: String): Single<DeletedStatus>
|
||||
fun pin(status: Status, pin: Boolean)
|
||||
|
|
@ -107,8 +107,8 @@ class TimelineCasesImpl(
|
|||
}
|
||||
}
|
||||
|
||||
override fun mute(id: String) {
|
||||
val call = mastodonApi.muteAccount(id)
|
||||
override fun mute(id: String, notifications: Boolean) {
|
||||
val call = mastodonApi.muteAccount(id, notifications)
|
||||
call.enqueue(object : Callback<Relationship> {
|
||||
override fun onResponse(call: Call<Relationship>, response: Response<Relationship>) {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue