@fedify/fedify 1.0.0-dev.396 → 1.0.0-dev.397

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGES.md CHANGED
@@ -28,6 +28,10 @@ To be released.
28
28
  - Added `attachSignature()` function.
29
29
  - Added `detachSignature()` function.
30
30
 
31
+ - WebFinger responses now include <http://webfinger.net/rel/avatar> links
32
+ if the `Actor` object returned by the actor dispatcher has `icon`/`icons`
33
+ property.
34
+
31
35
  - The `fedify inbox` command now sends `Delete(Application)` activities when
32
36
  it's terminated so that the peers can clean up data related to the temporary
33
37
  actor. [[#135]]
@@ -82,6 +82,17 @@ export async function handleWebFinger(request, { context, actorDispatcher, actor
82
82
  });
83
83
  }
84
84
  }
85
+ for await (const image of actor.getIcons()) {
86
+ if (image.url?.href == null)
87
+ continue;
88
+ const link = {
89
+ rel: "http://webfinger.net/rel/avatar",
90
+ href: image.url.href.toString(),
91
+ };
92
+ if (image.mediaType != null)
93
+ link.type = image.mediaType;
94
+ links.push(link);
95
+ }
85
96
  const jrd = {
86
97
  subject: resourceUrl.href,
87
98
  aliases: resourceUrl.href === context.getActorUri(handle).href
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.0.0-dev.396+e3232eb6",
3
+ "version": "1.0.0-dev.397+5d90f7d1",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/webfinger/handler.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM/D;;GAEG;AACH,MAAM,WAAW,0BAA0B,CAAC,YAAY;IACtD;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,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