Skip to content

Commit

Permalink
Merge tag '0.1.3'
Browse files Browse the repository at this point in the history
Hollo 0.1.3
  • Loading branch information
dahlia committed Oct 27, 2024
2 parents 5fd7f18 + a91f178 commit 876c624
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ To be released.
[#47]: https://github.com/dahlia/hollo/pull/47


Version 0.1.3
-------------

Released on October 27, 2024.

- Fixed incorrect handling of relative path URIs in `Link` headers with
`rel=alternate`. This caused inoperability with some software such as
GoToSocial.
- It now sends `Delete(Person)` activity to followees besides followers
when a user deletes their account.


Version 0.1.2
-------------

Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.577.0",
"@aws-sdk/credential-providers": "^3.577.0",
"@fedify/fedify": "^1.1.1",
"@fedify/fedify": "^1.1.2",
"@fedify/markdown-it-hashtag": "0.2.0",
"@fedify/markdown-it-mention": "^0.1.1",
"@fedify/postgres": "0.1.0",
Expand Down
33 changes: 28 additions & 5 deletions src/pages/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Move,
type Object,
PUBLIC_COLLECTION,
type Recipient,
Update,
exportJwk,
generateCryptoKeyPair,
Expand Down Expand Up @@ -30,6 +31,7 @@ import {
type PostVisibility,
accountOwners,
accounts as accountsTable,
follows,
} from "../schema.ts";
import { extractCustomEmojis, formatText } from "../text.ts";

Expand Down Expand Up @@ -269,14 +271,35 @@ accounts.post("/:id/delete", async (c) => {
});
if (accountOwner == null) return c.notFound();
const fedCtx = federation.createContext(c.req.raw, undefined);
const activity = new Delete({
actor: fedCtx.getActorUri(accountOwner.handle),
to: PUBLIC_COLLECTION,
object: await fedCtx.getActor(accountOwner.handle),
});
await fedCtx.sendActivity(
{ handle: accountOwner.handle },
"followers",
new Delete({
actor: fedCtx.getActorUri(accountOwner.handle),
to: PUBLIC_COLLECTION,
object: await fedCtx.getActor(accountOwner.handle),
}),
activity,
{ preferSharedInbox: true, excludeBaseUris: [fedCtx.url] },
);
const following = await db.query.follows.findMany({
with: { following: true },
where: eq(follows.followerId, accountId),
});
await fedCtx.sendActivity(
{ handle: accountOwner.handle },
following.map(
(f) =>
({
id: new URL(f.following.iri),
inboxId: new URL(f.following.inboxUrl),
endpoints:
f.following.sharedInboxUrl == null
? null
: { sharedInbox: new URL(f.following.sharedInboxUrl) },
}) satisfies Recipient,
),
activity,
{ preferSharedInbox: true, excludeBaseUris: [fedCtx.url] },
);
await db.transaction(async (tx) => {
Expand Down

0 comments on commit 876c624

Please sign in to comment.