Skip to content

Commit

Permalink
visibilityの処理をfastifyに合わせる
Browse files Browse the repository at this point in the history
  • Loading branch information
tar-bin committed Dec 21, 2024
1 parent ecaa73b commit 6df0f3c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/stream/channels/antenna.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AntennaChannel extends Channel {

if (this.isNoteMutedOrBlocked(note)) return;

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/stream/channels/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ChannelChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class GlobalTimelineChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class HomeTimelineChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class HybridTimelineChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class LocalTimelineChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class RoleTimelineChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class UserListChannel extends Channel {
}
}

if (this.idOnly && !["followers", "specified"].includes(note.visibility)) {
if (this.idOnly && ['public', 'home'].includes(note.visibility)) {
const idOnlyNote = { id: note.id, idOnly: true };
this.send("note", idOnlyNote);
} else {
Expand Down

0 comments on commit 6df0f3c

Please sign in to comment.