mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 20:32:50 +02:00
UI for linking existing space
This commit is contained in:
parent
3d0609f8f1
commit
d45a0bdc10
15 changed files with 293 additions and 116 deletions
|
@ -82,6 +82,16 @@ async function leaveRoom(roomID, mxid) {
|
|||
await mreq.mreq("POST", path(`/client/v3/rooms/${roomID}/leave`, mxid), {})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} roomID
|
||||
* @param {string} reason
|
||||
* @param {string} [mxid]
|
||||
*/
|
||||
async function leaveRoomWithReason(roomID, reason, mxid) {
|
||||
console.log(`[api] leave: ${roomID}: ${mxid}, because ${reason}`)
|
||||
await mreq.mreq("POST", path(`/client/v3/rooms/${roomID}/leave`, mxid), {reason})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} roomID
|
||||
* @param {string} eventID
|
||||
|
@ -404,6 +414,7 @@ module.exports.createRoom = createRoom
|
|||
module.exports.joinRoom = joinRoom
|
||||
module.exports.inviteToRoom = inviteToRoom
|
||||
module.exports.leaveRoom = leaveRoom
|
||||
module.exports.leaveRoomWithReason = leaveRoomWithReason
|
||||
module.exports.getEvent = getEvent
|
||||
module.exports.getEventForTimestamp = getEventForTimestamp
|
||||
module.exports.getAllState = getAllState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue