File tree Expand file tree Collapse file tree
apps/sim/connectors/confluence Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,26 +307,16 @@ export const confluenceConnector: ConnectorConfig = {
307307 const labels = labelMap . get ( String ( page . id ) ) ?? [ ]
308308
309309 const links = page . _links as Record < string , unknown > | undefined
310- const version = page . version as Record < string , unknown > | undefined
311- const versionNumber = version ?. number as number | undefined
312- const lastModified = ( version ?. createdAt ?? version ?. when ?? '' ) as string
313- const versionKey = versionNumber ?? lastModified
310+ const stub = pageToStub ( page , {
311+ spaceId : page . spaceId ,
312+ labels,
313+ sourceUrl : links ?. webui ? `https://${ domain } /wiki${ links . webui } ` : undefined ,
314+ } )
314315
315316 return {
316- externalId : String ( page . id ) ,
317- title : ( page . title as string ) || 'Untitled' ,
317+ ...stub ,
318318 content : plainText ,
319319 contentDeferred : false ,
320- mimeType : 'text/plain' ,
321- sourceUrl : links ?. webui ? `https://${ domain } /wiki${ links . webui } ` : undefined ,
322- contentHash : `confluence:${ page . id } :${ versionKey } ` ,
323- metadata : {
324- spaceId : page . spaceId ,
325- status : page . status ,
326- version : versionNumber ,
327- labels,
328- lastModified,
329- } ,
330320 }
331321 } ,
332322
You can’t perform that action at this time.
0 commit comments