Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
dc058273
Unverified
Commit
dc058273
authored
1 year ago
by
ikasoba
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix: STLでフォローしていないチャンネルが表示される問題を修正 (#12143)
* タイムラインをpostgresから取得する際にフォローしていないチャンネルが取得されるのを修正 * CHANGELOGに追記
parent
02454620
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+17
-1
17 additions, 1 deletion
...backend/src/server/api/endpoints/notes/hybrid-timeline.ts
with
18 additions
and
1 deletion
CHANGELOG.md
+
1
−
0
View file @
dc058273
...
...
@@ -31,6 +31,7 @@
-
Fix: ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正
-
Fix: 自分のフォローしているユーザーの自分のフォローしていないユーザーの visibility: followers な投稿への返信がストリーミングで流れてくる問題を修正
-
Fix: RedisへのTLキャッシュが有効の場合にHTL/LTL/STLが空になることがある問題を修正
-
Fix: STLでフォローしていないチャンネルが取得される問題を修正
## 2023.10.2
...
...
This diff is collapsed.
Click to expand it.
packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+
17
−
1
View file @
dc058273
...
...
@@ -5,7 +5,7 @@
import
{
Brackets
}
from
'
typeorm
'
;
import
{
Inject
,
Injectable
}
from
'
@nestjs/common
'
;
import
type
{
NotesRepository
,
FollowingsRepository
,
MiNote
}
from
'
@/models/_.js
'
;
import
type
{
NotesRepository
,
FollowingsRepository
,
MiNote
,
ChannelFollowingsRepository
}
from
'
@/models/_.js
'
;
import
{
Endpoint
}
from
'
@/server/api/endpoint-base.js
'
;
import
ActiveUsersChart
from
'
@/core/chart/charts/active-users.js
'
;
import
{
NoteEntityService
}
from
'
@/core/entities/NoteEntityService.js
'
;
...
...
@@ -69,6 +69,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@
Inject
(
DI
.
notesRepository
)
private
notesRepository
:
NotesRepository
,
@
Inject
(
DI
.
channelFollowingsRepository
)
private
channelFollowingsRepository
:
ChannelFollowingsRepository
,
private
noteEntityService
:
NoteEntityService
,
private
roleService
:
RoleService
,
private
activeUsersChart
:
ActiveUsersChart
,
...
...
@@ -208,6 +211,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withReplies
:
boolean
,
},
me
:
MiLocalUser
)
{
const
followees
=
await
this
.
userFollowingService
.
getFollowees
(
me
.
id
);
const
followingChannels
=
await
this
.
channelFollowingsRepository
.
find
({
where
:
{
followerId
:
me
.
id
,
},
});
const
query
=
this
.
queryService
.
makePaginationQuery
(
this
.
notesRepository
.
createQueryBuilder
(
'
note
'
),
ps
.
sinceId
,
ps
.
untilId
)
.
andWhere
(
new
Brackets
(
qb
=>
{
...
...
@@ -226,6 +234,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.
leftJoinAndSelect
(
'
reply.user
'
,
'
replyUser
'
)
.
leftJoinAndSelect
(
'
renote.user
'
,
'
renoteUser
'
);
if
(
followingChannels
.
length
>
0
)
{
const
followingChannelIds
=
followingChannels
.
map
(
x
=>
x
.
followeeId
);
query
.
andWhere
(
'
note.channelId IN (:...followingChannelIds) OR note.channelId IS NULL
'
,
{
followingChannelIds
});
}
else
{
query
.
andWhere
(
'
note.channelId IS NULL
'
);
}
if
(
!
ps
.
withReplies
)
{
query
.
andWhere
(
new
Brackets
(
qb
=>
{
qb
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment