fix: Include creator in collaboratorIds for document listing

Documents with empty collaboratorIds don't appear in collection sidebar.
Now includes creator's userId in the array.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 21:05:12 +00:00
parent 9598aba0bf
commit b0ec9558f2
9 changed files with 19 additions and 10 deletions

View File

@@ -68,7 +68,7 @@ async function main() {
JSON.stringify({
status: 'ok',
transport: 'streamable-http',
version: '1.3.11',
version: '1.3.12',
sessions: sessions.size,
stateful: STATEFUL,
tools: allTools.length
@@ -101,7 +101,7 @@ async function main() {
// Create MCP server
const server = createMcpServer(pgClient.getPool(), {
name: 'mcp-outline-http',
version: '1.3.11'
version: '1.3.12'
});
// Track session if stateful

View File

@@ -39,7 +39,7 @@ async function main() {
// Create MCP server with shared configuration
const server = createMcpServer(pgClient.getPool(), {
name: 'mcp-outline-postgresql',
version: '1.3.11'
version: '1.3.12'
});
// Connect stdio transport

View File

@@ -122,7 +122,7 @@ export function createMcpServer(
): Server {
const server = new Server({
name: config.name || 'mcp-outline-postgresql',
version: config.version || '1.3.11'
version: config.version || '1.3.12'
});
// Set capabilities (required for MCP v2.2+)

View File

@@ -249,7 +249,7 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
VALUES (
gen_random_uuid(),
substring(md5(random()::text) from 1 for 10),
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, '{}'
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, ARRAY[$6]::uuid[]
)
RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt"
`;