1
0
Fork 1
mirror of https://example.com synced 2024-11-23 08:46:39 +09:00

feat: show home posts by following users in antennas (close #23)

This commit is contained in:
naskya 2023-07-22 13:29:49 +00:00
parent 16e909cbfe
commit 03f1d26be7
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
3 changed files with 4 additions and 4 deletions

View file

@ -17,6 +17,8 @@
## 細かい変更点
- アンテナにフォロー中のユーザーのホーム投稿も表示する
- フォロー中のユーザーの投稿は見たいから
- 猫のアカウントはアイコンを常に丸く表示する
- そのほうがかわいいため
- 閲覧注意の投稿への返信で注釈の先頭に "re:" をつける設定を追加

View file

@ -26,7 +26,6 @@ export async function checkHitAntenna(
antennaUserFollowing?: User["id"][],
): Promise<boolean> {
if (note.visibility === "specified") return false;
if (note.visibility === "home") return false;
// アンテナ作成者がノート作成者にブロックされていたらスキップ
const blockings = await blockingCache.fetch(noteUser.id, () =>
@ -36,7 +35,7 @@ export async function checkHitAntenna(
);
if (blockings.some((blocking) => blocking === antenna.userId)) return false;
if (note.visibility === "followers") {
if (note.visibility === "followers" || note.visibility === "home") {
if (noteUserFollowers && !noteUserFollowers.includes(antenna.userId))
return false;
if (antennaUserFollowing && !antennaUserFollowing.includes(note.userId))

View file

@ -98,8 +98,7 @@ export default define(meta, paramDef, async (ps, user) => {
.leftJoinAndSelect("replyUser.banner", "replyUserBanner")
.leftJoinAndSelect("renote.user", "renoteUser")
.leftJoinAndSelect("renoteUser.avatar", "renoteUserAvatar")
.leftJoinAndSelect("renoteUser.banner", "renoteUserBanner")
.andWhere("note.visibility != 'home'");
.leftJoinAndSelect("renoteUser.banner", "renoteUserBanner");
generateVisibilityQuery(query, user);
generateMutedUserQuery(query, user);