Skip to content

Commit 876c624

Browse files
committed
Merge tag '0.1.3'
Hollo 0.1.3
2 parents 5fd7f18 + a91f178 commit 876c624

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

CHANGES.md

+12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ To be released.
3131
[#47]: https://github.com/dahlia/hollo/pull/47
3232

3333

34+
Version 0.1.3
35+
-------------
36+
37+
Released on October 27, 2024.
38+
39+
- Fixed incorrect handling of relative path URIs in `Link` headers with
40+
`rel=alternate`. This caused inoperability with some software such as
41+
GoToSocial.
42+
- It now sends `Delete(Person)` activity to followees besides followers
43+
when a user deletes their account.
44+
45+
3446
Version 0.1.2
3547
-------------
3648

bun.lockb

0 Bytes
Binary file not shown.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@aws-sdk/client-s3": "^3.577.0",
1515
"@aws-sdk/credential-providers": "^3.577.0",
16-
"@fedify/fedify": "^1.1.1",
16+
"@fedify/fedify": "^1.1.2",
1717
"@fedify/markdown-it-hashtag": "0.2.0",
1818
"@fedify/markdown-it-mention": "^0.1.1",
1919
"@fedify/postgres": "0.1.0",

src/pages/accounts.tsx

+28-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Move,
44
type Object,
55
PUBLIC_COLLECTION,
6+
type Recipient,
67
Update,
78
exportJwk,
89
generateCryptoKeyPair,
@@ -30,6 +31,7 @@ import {
3031
type PostVisibility,
3132
accountOwners,
3233
accounts as accountsTable,
34+
follows,
3335
} from "../schema.ts";
3436
import { extractCustomEmojis, formatText } from "../text.ts";
3537

@@ -269,14 +271,35 @@ accounts.post("/:id/delete", async (c) => {
269271
});
270272
if (accountOwner == null) return c.notFound();
271273
const fedCtx = federation.createContext(c.req.raw, undefined);
274+
const activity = new Delete({
275+
actor: fedCtx.getActorUri(accountOwner.handle),
276+
to: PUBLIC_COLLECTION,
277+
object: await fedCtx.getActor(accountOwner.handle),
278+
});
272279
await fedCtx.sendActivity(
273280
{ handle: accountOwner.handle },
274281
"followers",
275-
new Delete({
276-
actor: fedCtx.getActorUri(accountOwner.handle),
277-
to: PUBLIC_COLLECTION,
278-
object: await fedCtx.getActor(accountOwner.handle),
279-
}),
282+
activity,
283+
{ preferSharedInbox: true, excludeBaseUris: [fedCtx.url] },
284+
);
285+
const following = await db.query.follows.findMany({
286+
with: { following: true },
287+
where: eq(follows.followerId, accountId),
288+
});
289+
await fedCtx.sendActivity(
290+
{ handle: accountOwner.handle },
291+
following.map(
292+
(f) =>
293+
({
294+
id: new URL(f.following.iri),
295+
inboxId: new URL(f.following.inboxUrl),
296+
endpoints:
297+
f.following.sharedInboxUrl == null
298+
? null
299+
: { sharedInbox: new URL(f.following.sharedInboxUrl) },
300+
}) satisfies Recipient,
301+
),
302+
activity,
280303
{ preferSharedInbox: true, excludeBaseUris: [fedCtx.url] },
281304
);
282305
await db.transaction(async (tx) => {

0 commit comments

Comments
 (0)