Skip to content

Commit 221acec

Browse files
committed
Timeline inboxes
1 parent 0b6750e commit 221acec

File tree

16 files changed

+3850
-328
lines changed

16 files changed

+3850
-328
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: pnpm/action-setup@v4
1818
with:
19-
version: 9
19+
version: 9.15.1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf
2020
run_install: false
2121
- uses: actions/setup-node@v4
2222
with:

CHANGES.md

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ To be released.
99
- Hollo is now powered by Node.js 23+ instead of Bun for more efficient
1010
memory usage.
1111

12+
- Added an experimental feature flag `TIMELINE_INBOXES` to store all posts
13+
visible to your timeline in the database, rather than filtering them
14+
in real-time as they are displayed. This is useful for relatively
15+
larger instances with many incoming posts, but as of now it may have
16+
several bugs. It is expected to be the default behavior in the future
17+
after it is stabilized.
18+
1219
- Now you can import and export your data from the administration dashboard
1320
in CSV format: follows, lists, accounts you muted, accounts you blocked,
1421
and bookmarks.

docs/src/content/docs/install/env.mdx

+12
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ encountered first time.
7373

7474
`10` by default.
7575

76+
### `TIMELINE_INBOXES` <Badge text="Optional" />
77+
78+
Setting this to `true` lets your timelines work like inboxes: all posts visible
79+
to your timeline are physically stored in the database, rather than being
80+
filtered in real-time as they are displayed. This is useful for relatively
81+
larger instances with many incoming posts.
82+
83+
As of Hollo 0.4.0, it is experimental and may have several bugs, but it is
84+
epxected to be the default behavior in the future after it is stabilized.
85+
86+
Turned off by default.
87+
7688

7789
Logging and debugging
7890
---------------------

docs/src/content/docs/ja/install/env.mdx

+12
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ HolloがL7ロードバランサーの後ろにある場合(通常はそうす
7373

7474
デフォルトは`10`です。
7575

76+
### `TIMELINE_INBOXES` <Badge text="オプション" />
77+
78+
このオプションを`true`に設定すると、タイムラインが受信箱のように動作します。
79+
つまり、タイムラインに表示される投稿がリアルタイムでフィルタリングされるのではなく、
80+
事前に取得された投稿がデータベースに保存されます。
81+
この機能は多くのリモート投稿を受信する相対的に大きなインスタンスで有用です。
82+
83+
Hollo 0.4.0時点では、この機能は実験的であり、バグがあるかもしれません。
84+
しかし、この機能は安定化した後にデフォルトの動作に変更される予定です。
85+
86+
基本的にはオフになっています。
87+
7688

7789
ログとデバッグ
7890
--------------

docs/src/content/docs/ko/install/env.mdx

+12
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ Hollo가 L7 로드 밸런서 뒤에 위치할 경우 (일반적으로 그래야
7272

7373
기본값은 `10`입니다.
7474

75+
### `TIMELINE_INBOXES` <Badge text="선택" />
76+
77+
이 옵션을 `true`로 설정하면 타임라인이 수신함처럼 작동합니다. 즉, 타임라인에
78+
표시될 게시물들이 실시간으로 필터링되는 것이 아니라, 미리 추출된 게시물들이
79+
데이터베이스에 저장됩니다. 이 기능은 많은 원격 게시물을 수신하는 상대적으로
80+
큰 인스턴스에서 유용합니다.
81+
82+
Hollo 0.4.0 시점에서 이 기능은 실험적이며, 버그가 있을 수 있습니다. 하지만
83+
이 기능은 안정화된 뒤에 기본 동작으로 바뀔 예정입니다.
84+
85+
기본적으로는 꺼져 있습니다.
86+
7587

7688
로그 및 디버그
7789
--------------

docs/src/content/docs/zh-cn/install/env.mdx

+11
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ openssl rand -hex 32
6464

6565
默认为`10`
6666

67+
### `TIMELINE_INBOXES` <Badge text="可选" />
68+
69+
将此设置为`true`后,您的时间线就像收件箱一样:
70+
时间线上可见的所有帖子都实际存储在数据库中,而不是在显示时实时过滤。
71+
这对于有大量传入帖子的相对较大的实例非常有用。
72+
73+
从Hollo 0.4.0开始,它还处于实验阶段,可能存在一些错误,
74+
但预计在稳定后将成为未来的默认行为。
75+
76+
默认情况下关闭。
77+
6778

6879
日志和调试
6980
----------

drizzle/0059_timeline_inboxes.sql

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CREATE TABLE "list_posts" (
2+
"list_id" uuid NOT NULL,
3+
"post_id" uuid NOT NULL,
4+
CONSTRAINT "list_posts_list_id_post_id_pk" PRIMARY KEY("list_id","post_id")
5+
);
6+
--> statement-breakpoint
7+
CREATE TABLE "timeline_posts" (
8+
"account_id" uuid NOT NULL,
9+
"post_id" uuid NOT NULL,
10+
CONSTRAINT "timeline_posts_account_id_post_id_pk" PRIMARY KEY("account_id","post_id")
11+
);
12+
--> statement-breakpoint
13+
ALTER TABLE "list_posts" ADD CONSTRAINT "list_posts_list_id_lists_id_fk" FOREIGN KEY ("list_id") REFERENCES "public"."lists"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
14+
ALTER TABLE "list_posts" ADD CONSTRAINT "list_posts_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
15+
ALTER TABLE "timeline_posts" ADD CONSTRAINT "timeline_posts_account_id_account_owners_id_fk" FOREIGN KEY ("account_id") REFERENCES "public"."account_owners"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
16+
ALTER TABLE "timeline_posts" ADD CONSTRAINT "timeline_posts_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
17+
CREATE INDEX "list_posts_list_id_post_id_index" ON "list_posts" USING btree ("list_id","post_id");--> statement-breakpoint
18+
CREATE INDEX "timeline_posts_account_id_post_id_index" ON "timeline_posts" USING btree ("account_id","post_id");

0 commit comments

Comments
 (0)