KI-AGENT: Matrix-Einbettung stabilisieren
This commit is contained in:
@@ -125,6 +125,17 @@ export default async function communicationRoutes(server: FastifyInstance) {
|
||||
}
|
||||
})
|
||||
|
||||
server.post("/communication/matrix/rooms/general/session", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.createElementRoomSession(req.user.user_id, req.user.tenant_id, {
|
||||
key: "allgemein",
|
||||
name: "Allgemeiner Chat",
|
||||
})
|
||||
} catch (err: any) {
|
||||
return handleMatrixError(req, reply, err, "Matrix session failed")
|
||||
}
|
||||
})
|
||||
|
||||
server.post("/communication/matrix/rooms/general/members/sync", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.syncTenantRoomMembers(req.user.user_id, req.user.tenant_id, {
|
||||
@@ -190,6 +201,18 @@ export default async function communicationRoutes(server: FastifyInstance) {
|
||||
}
|
||||
})
|
||||
|
||||
server.post("/communication/matrix/rooms/:roomKey/session", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.createElementRoomSession(
|
||||
req.user.user_id,
|
||||
req.user.tenant_id,
|
||||
roomOptionsFromRequest(req)
|
||||
)
|
||||
} catch (err: any) {
|
||||
return handleMatrixError(req, reply, err, "Matrix session failed")
|
||||
}
|
||||
})
|
||||
|
||||
server.post("/communication/matrix/rooms/:roomKey/members/sync", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.syncTenantRoomMembers(
|
||||
|
||||
Reference in New Issue
Block a user