Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/repco-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"iso8601-duration": "^2.1.1",
"level": "^8.0.0",
"multiformats": "^11.0.2",
"repco-common": "*",
"repco-activitypub": "*",
"repco-common": "*",
"repco-prisma": "*",
"rss-parser": "^3.12.0",
"speedometer": "^1.1.0",
"streamx": "^2.12.5",
"uint8arrays": "^4.0.3",
"undici": "^5.28.0",
"undici": "^5.28.2",
"vscode-uri": "^3.0.6",
"zod": "^3.19"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/repco-core/src/datasources/activitypub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ export class ActivityPubDataSource
const category =
video.category &&
video.category !== undefined &&
this._uriLink('category', video.category.identifier)
this._uriLink('category', 'peertube:' + video.category.name)
category && conceptLinks.push(category)

const tags =
Expand Down
10 changes: 8 additions & 2 deletions packages/repco-core/src/repo/relation-finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,25 @@ export class RelationFinder {
// check if already in map: resolve now
if (this.uriMap.has(value.uri)) {
value.uid = this.uriMap.get(value.uri)
// BUG? NOTHING HAPPENS WITH value.uid
} else {
this.pendingUris.add(value.uri)
if (relation) this.relsByUri.push(value.uri, relation)
}
}

pushEntity(entity: EntityInputWithHeaders) {
const uid = entity.uid
let uid = entity.uid
if (this.entities.has(uid)) return
this.entities.set(uid, entity)
if (entity.headers.EntityUris) {
for (const uri of entity.headers.EntityUris) {
const foundUid = this.uriMap.get(uri)
if (foundUid) {
// if entity with the same uri already exists delete it from entities
this.entities.delete(uid)
uid = foundUid
break
}
this.discoveredUid(uri, uid)
}
}
Expand Down