Skip to content

Commit 4c62acc

Browse files
committed
ability to kick users from project
1 parent 17e90fb commit 4c62acc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/project-list.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ ProjectList.prototype.join = async function (projectId) {
7272
}
7373
}
7474

75+
ProjectList.prototype.kick = async function (projectId, userId) {
76+
const upstreamId = this.wellKnown.get(projectId)
77+
return this.structureAPI.kick(upstreamId, userId)
78+
}
79+
7580
ProjectList.prototype.setName = async function (projectId, name) {
7681
const upstreamId = this.wellKnown.get(projectId)
7782
return this.structureAPI.setName(upstreamId, name)

src/structure-api.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class StructureAPI {
107107
return this.httpAPI.members(globalId)
108108
}
109109

110+
async kick (globalId, userId) {
111+
return this.httpAPI.kick(globalId, userId)
112+
}
113+
110114
async permissions (globalId, userId) {
111115
const state = await this.httpAPI.getState(globalId)
112116
const roomPowerlevels = state.find(stateEvent => stateEvent.type === 'm.room.power_levels')

0 commit comments

Comments
 (0)