KI-AGENT: Matrix-Räume persistent verwalten
This commit is contained in:
@@ -12,12 +12,24 @@ export default async function communicationRoutes(server: FastifyInstance) {
|
||||
|
||||
const roomOptionsFromRequest = (req: any) => {
|
||||
const params = req.params as { roomKey?: string }
|
||||
const body = (req.body || {}) as { key?: string, name?: string, topic?: string }
|
||||
const body = (req.body || {}) as {
|
||||
key?: string
|
||||
name?: string
|
||||
topic?: string
|
||||
type?: string
|
||||
entityType?: string | null
|
||||
entityId?: number | null
|
||||
entityUuid?: string | null
|
||||
}
|
||||
|
||||
return {
|
||||
key: params.roomKey || body.key,
|
||||
name: body.name,
|
||||
topic: body.topic,
|
||||
type: body.type,
|
||||
entityType: body.entityType,
|
||||
entityId: body.entityId,
|
||||
entityUuid: body.entityUuid,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +137,7 @@ export default async function communicationRoutes(server: FastifyInstance) {
|
||||
server.get("/communication/matrix/rooms/:roomKey", async (req, reply) => {
|
||||
try {
|
||||
const params = req.params as { roomKey: string }
|
||||
return await matrix.getTenantRoomStatus(req.user.tenant_id, params.roomKey, params.roomKey)
|
||||
return await matrix.getTenantRoomStatus(req.user.tenant_id, params.roomKey)
|
||||
} catch (err: any) {
|
||||
return handleMatrixError(req, reply, err, "Matrix room status failed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user