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
ae1e2760
Commit
ae1e2760
authored
1 year ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
fix of
6cc02fee
parent
6b5ee438
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+11
-2
11 additions, 2 deletions
...backend/src/server/api/endpoints/notes/hybrid-timeline.ts
packages/backend/src/server/api/endpoints/notes/timeline.ts
+12
-2
12 additions, 2 deletions
packages/backend/src/server/api/endpoints/notes/timeline.ts
with
23 additions
and
4 deletions
packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+
11
−
2
View file @
ae1e2760
...
@@ -163,8 +163,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...
@@ -163,8 +163,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
else
{
// fallback to db
}
else
{
// fallback to db
const
followees
=
await
this
.
userFollowingService
.
getFollowees
(
me
.
id
);
const
followees
=
await
this
.
userFollowingService
.
getFollowees
(
me
.
id
);
const
query
=
this
.
queryService
.
makePaginationQuery
(
this
.
notesRepository
.
createQueryBuilder
(
'
note
'
),
const
query
=
this
.
queryService
.
makePaginationQuery
(
this
.
notesRepository
.
createQueryBuilder
(
'
note
'
),
ps
.
sinceId
,
ps
.
untilId
,
ps
.
sinceDate
,
ps
.
untilDate
)
ps
.
sinceId
,
ps
.
untilId
,
ps
.
sinceDate
,
ps
.
untilDate
)
.
andWhere
(
new
Brackets
(
qb
=>
{
.
andWhere
(
new
Brackets
(
qb
=>
{
if
(
followees
.
length
>
0
)
{
if
(
followees
.
length
>
0
)
{
const
meOrFolloweeIds
=
[
me
.
id
,
...
followees
.
map
(
f
=>
f
.
followeeId
)];
const
meOrFolloweeIds
=
[
me
.
id
,
...
followees
.
map
(
f
=>
f
.
followeeId
)];
...
@@ -181,6 +180,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...
@@ -181,6 +180,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.
leftJoinAndSelect
(
'
reply.user
'
,
'
replyUser
'
)
.
leftJoinAndSelect
(
'
reply.user
'
,
'
replyUser
'
)
.
leftJoinAndSelect
(
'
renote.user
'
,
'
renoteUser
'
);
.
leftJoinAndSelect
(
'
renote.user
'
,
'
renoteUser
'
);
query
.
andWhere
(
new
Brackets
(
qb
=>
{
qb
.
where
(
'
note.replyId IS NULL
'
)
// 返信ではない
.
orWhere
(
new
Brackets
(
qb
=>
{
qb
// 返信だけど投稿者自身への返信
.
where
(
'
note.replyId IS NOT NULL
'
)
.
andWhere
(
'
note.replyUserId = note.userId
'
);
}));
}));
this
.
queryService
.
generateVisibilityQuery
(
query
,
me
);
this
.
queryService
.
generateVisibilityQuery
(
query
,
me
);
this
.
queryService
.
generateMutedUserQuery
(
query
,
me
);
this
.
queryService
.
generateMutedUserQuery
(
query
,
me
);
this
.
queryService
.
generateBlockedUserQuery
(
query
,
me
);
this
.
queryService
.
generateBlockedUserQuery
(
query
,
me
);
...
...
This diff is collapsed.
Click to expand it.
packages/backend/src/server/api/endpoints/notes/timeline.ts
+
12
−
2
View file @
ae1e2760
...
@@ -127,8 +127,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...
@@ -127,8 +127,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const
followees
=
await
this
.
userFollowingService
.
getFollowees
(
me
.
id
);
const
followees
=
await
this
.
userFollowingService
.
getFollowees
(
me
.
id
);
//#region Construct query
//#region Construct query
const
query
=
this
.
queryService
.
makePaginationQuery
(
this
.
notesRepository
.
createQueryBuilder
(
'
note
'
),
const
query
=
this
.
queryService
.
makePaginationQuery
(
this
.
notesRepository
.
createQueryBuilder
(
'
note
'
),
ps
.
sinceId
,
ps
.
untilId
,
ps
.
sinceDate
,
ps
.
untilDate
)
ps
.
sinceId
,
ps
.
untilId
,
ps
.
sinceDate
,
ps
.
untilDate
)
.
andWhere
(
'
note.channelId IS NULL
'
)
.
innerJoinAndSelect
(
'
note.user
'
,
'
user
'
)
.
innerJoinAndSelect
(
'
note.user
'
,
'
user
'
)
.
leftJoinAndSelect
(
'
note.reply
'
,
'
reply
'
)
.
leftJoinAndSelect
(
'
note.reply
'
,
'
reply
'
)
.
leftJoinAndSelect
(
'
note.renote
'
,
'
renote
'
)
.
leftJoinAndSelect
(
'
note.renote
'
,
'
renote
'
)
...
@@ -143,6 +143,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...
@@ -143,6 +143,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
query
.
andWhere
(
'
note.userId = :meId
'
,
{
meId
:
me
.
id
});
query
.
andWhere
(
'
note.userId = :meId
'
,
{
meId
:
me
.
id
});
}
}
query
.
andWhere
(
new
Brackets
(
qb
=>
{
qb
.
where
(
'
note.replyId IS NULL
'
)
// 返信ではない
.
orWhere
(
new
Brackets
(
qb
=>
{
qb
// 返信だけど投稿者自身への返信
.
where
(
'
note.replyId IS NOT NULL
'
)
.
andWhere
(
'
note.replyUserId = note.userId
'
);
}));
}));
this
.
queryService
.
generateVisibilityQuery
(
query
,
me
);
this
.
queryService
.
generateVisibilityQuery
(
query
,
me
);
this
.
queryService
.
generateMutedUserQuery
(
query
,
me
);
this
.
queryService
.
generateMutedUserQuery
(
query
,
me
);
this
.
queryService
.
generateBlockedUserQuery
(
query
,
me
);
this
.
queryService
.
generateBlockedUserQuery
(
query
,
me
);
...
...
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