1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 05:38:55 +09:00

Merge branch 'develop' into external-resources

This commit is contained in:
かっこかり 2023-10-19 18:09:55 +09:00 committed by GitHub
commit bad6e00395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -163,6 +163,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
query.andWhere('note.fileIds != \'{}\''); query.andWhere('note.fileIds != \'{}\'');
} }
if (!ps.withReplies) {
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');
}));
}));
}
const timeline = await query.limit(ps.limit).getMany(); const timeline = await query.limit(ps.limit).getMany();
process.nextTick(() => { process.nextTick(() => {

View File

@ -60,7 +60,7 @@ export default function(props: {
switch (token.type) { switch (token.type) {
case 'text': { case 'text': {
let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n'); let text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
if (!disableNyaize && props.author.isCat) { if (!disableNyaize && props.author?.isCat) {
text = nyaize(text); text = nyaize(text);
} }