File tree 2 files changed +24
-12
lines changed
2 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ To be released.
11
11
- Fixed a bug of ` Object.toJsonLd() ` method where it had incorrectly compacted
12
12
the ` name ` property when it was not a language map.
13
13
14
+ - The ` Delete(Application) ` activities sent by the ` fedify inbox ` command now
15
+ embed the entire actor object instead of just the actor's URI so that
16
+ the peers can verify the actor's signature without fetching the actor
17
+ object.
18
+
14
19
15
20
Version 1.0.1
16
21
-------------
Original file line number Diff line number Diff line change @@ -194,18 +194,25 @@ async function acceptsFollowFrom(actor: Actor): Promise<boolean> {
194
194
const peers : Record < string , Actor > = { } ;
195
195
196
196
async function sendDeleteToPeers ( server : TemporaryServer ) : Promise < void > {
197
- const ctx = federation . createContext ( server . url , - 1 ) ;
198
- const actorId = ctx . getActorUri ( "i" ) ;
199
- await ctx . sendActivity (
200
- { identifier : "i" } ,
201
- Object . values ( peers ) ,
202
- new Delete ( {
203
- id : new URL ( `#delete` , actorId ) ,
204
- actor : actorId ,
205
- to : PUBLIC_COLLECTION ,
206
- object : actorId ,
207
- } ) ,
208
- ) ;
197
+ const ctx = federation . createContext ( new Request ( server . url ) , - 1 ) ;
198
+ const actor = ( await ctx . getActor ( "i" ) ) ! ;
199
+ try {
200
+ await ctx . sendActivity (
201
+ { identifier : "i" } ,
202
+ Object . values ( peers ) ,
203
+ new Delete ( {
204
+ id : new URL ( `#delete` , actor . id ! ) ,
205
+ actor : actor . id ! ,
206
+ to : PUBLIC_COLLECTION ,
207
+ object : actor ,
208
+ } ) ,
209
+ ) ;
210
+ } catch ( error ) {
211
+ logger . error (
212
+ "Failed to send Delete(Application) activities to peers:\n{error}" ,
213
+ { error } ,
214
+ ) ;
215
+ }
209
216
}
210
217
211
218
const followers : Record < string , Actor > = { } ;
You can’t perform that action at this time.
0 commit comments