pinafore/routes/_api/muteConversation.js
Nolan Lawson ad84adaf63
add ability to mute conversation (#291)
fixes another thing from #6
2018-05-12 22:49:01 -07:00

13 lines
514 B
JavaScript

import { auth, basename } from './utils'
import { postWithTimeout } from '../_utils/ajax'
export async function muteConversation (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/mute`
return postWithTimeout(url, null, auth(accessToken))
}
export async function unmuteConversation (instanceName, accessToken, statusId) {
let url = `${basename(instanceName)}/api/v1/statuses/${statusId}/unmute`
return postWithTimeout(url, null, auth(accessToken))
}