mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-11 04:33:02 +02:00
Sadly, the presence API is worse than I hoped
This commit is contained in:
parent
15826dcb3f
commit
381861ee8e
7 changed files with 69 additions and 19 deletions
|
@ -409,11 +409,11 @@ async function setAccountData(type, content, mxid) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {"online" | "offline" | "unavailable"} presence
|
||||
* @param {{presence: "online" | "offline" | "unavailable", status_msg?: string}} data
|
||||
* @param {string} mxid
|
||||
*/
|
||||
async function setPresence(presence, mxid) {
|
||||
await mreq.mreq("PUT", path(`/client/v3/presence/${mxid}/status`, mxid), {presence})
|
||||
async function setPresence(data, mxid) {
|
||||
await mreq.mreq("PUT", path(`/client/v3/presence/${mxid}/status`, mxid), data)
|
||||
}
|
||||
|
||||
module.exports.path = path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue