Skip to content

Commit 396d30c

Browse files
committed
fix queue task on pointers and baseUrl on worlds
1 parent 934b4cc commit 396d30c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ async function handleEntityId(
4141
if (ids.length > 0) {
4242
entityId = ids[0] // Use the first ID as the entityId
4343
logs.getLogger('main').log(`Resolved Entity ID from pointer: ${entityId}`)
44+
await taskQueue.publish({
45+
entity: {
46+
entityId,
47+
authChain: []
48+
},
49+
contentServerUrls: ['https://peer.decentraland.org/content']
50+
})
4451
} else {
4552
logs.getLogger('main').error('Error: No entity ID found for the given pointer')
4653
}
@@ -65,7 +72,8 @@ async function handleEntityId(
6572
if (urn) {
6673
const urnParts = urn.split(':')
6774
entityId = urnParts[3].split('?')[0] // Extract the entityId
68-
const baseUrl = urn.split('baseUrl=')[1] // Extract the baseUrl
75+
let baseUrl = urn.split('baseUrl=')[1] // Extract the baseUrl
76+
baseUrl = baseUrl.replace(/\/contents\/?$/, '') // Remove trailing /contents or /contents/
6977
logs.getLogger('main').log(`Resolved Entity ID: ${entityId}, Base URL: ${baseUrl}`)
7078

7179
// Publish the resolved entityId and baseUrl

0 commit comments

Comments
 (0)