forked from naskya/firefish
feat: show home posts by following users in antennas (close #23)
This commit is contained in:
parent
399e962496
commit
f548dd31d8
3 changed files with 4 additions and 4 deletions
|
@ -17,6 +17,8 @@
|
|||
|
||||
## 細かい変更点
|
||||
|
||||
- アンテナにフォロー中のユーザーのホーム投稿も表示する
|
||||
- フォロー中のユーザーの投稿は見たいから
|
||||
- 猫のアカウントはアイコンを常に丸く表示する
|
||||
- そのほうがかわいいため
|
||||
- 閲覧注意の投稿への返信で注釈の先頭に "re:" をつける設定を追加
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue