KI-AGENT: Matrix-Räume in FEDEO provisionieren

This commit is contained in:
2026-05-18 17:24:46 +02:00
parent d0de3cb92e
commit 7f66f66cfa
3 changed files with 287 additions and 2 deletions

View File

@@ -49,4 +49,29 @@ export default async function communicationRoutes(server: FastifyInstance) {
.send({ error: err.message || "Matrix tenant space provisioning failed" })
}
})
server.get("/communication/matrix/rooms/general", async (req, reply) => {
try {
return await matrix.getTenantRoomStatus(req.user.tenant_id, "allgemein", "Allgemeiner Chat")
} catch (err: any) {
req.log.error(err)
return reply
.code(err.statusCode || 500)
.send({ error: err.message || "Matrix room status failed" })
}
})
server.post("/communication/matrix/rooms/general/provision", async (req, reply) => {
try {
return await matrix.provisionTenantRoom(req.user.user_id, req.user.tenant_id, {
key: "allgemein",
name: "Allgemeiner Chat",
})
} catch (err: any) {
req.log.error(err)
return reply
.code(err.statusCode || 500)
.send({ error: err.message || "Matrix room provisioning failed" })
}
})
}