Skip to content

Commit a7db279

Browse files
committed
Relative URL handling w/ auto baseUrl inference
- Automatically infer baseUrl from object's @id when not provided - Use document URL as fallback baseUrl when fetching remote objects - Add comprehensive tests for relative URL resolution scenarios - Update property fetching to use documentUrl for baseUrl inference - Remove manual baseUrl parameter from property getter methods This eliminates the need for manual baseUrl specification in most cases while maintaining full compatibility with existing code. #411
1 parent 3b3c046 commit a7db279

6 files changed

Lines changed: 1364 additions & 1077 deletions

File tree

CHANGES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ To be released.
1111
### @fedify/fedify
1212

1313
- Fixed handling of ActivityPub objects containing relative URLs. The
14-
Activity Vocabulary classes now properly resolve relative URLs when
15-
a `baseUrl` option is provided to `fromJsonLd()` method, improving
14+
Activity Vocabulary classes now automatically resolve relative URLs by
15+
inferring the base URL from the object's `@id` or document URL, eliminating
16+
the need for manual `baseUrl` specification in most cases. This improves
1617
interoperability with ActivityPub servers that emit relative URLs in
1718
properties like `icon.url` and `image.url`. [[#411], [#443] by Jiwon Kwon]
1819

0 commit comments

Comments
 (0)