mirror of
https://github.com/sim1222/misskey.git
synced 2025-04-28 18:27:21 +09:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
f46f9f7ddd
@ -7,5 +7,5 @@ charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
|
||||
[*.yml]
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
|
@ -9,10 +9,11 @@
|
||||
|
||||
You should also include the user name that made the change.
|
||||
-->
|
||||
## 13.x.x (unreleased)
|
||||
## 13.8.0 (2023/02/26)
|
||||
|
||||
### Improvements
|
||||
- チャンネル内ハイライト
|
||||
- ホームタイムラインのパフォーマンスを改善
|
||||
- renoteした際の表示を改善
|
||||
- バックグラウンドで一定時間経過したらページネーションのアイテム更新をしない
|
||||
- enhance(client): MkUrlPreviewの閉じるボタンを見やすく
|
||||
@ -27,6 +28,7 @@ You should also include the user name that made the change.
|
||||
- fix(client): Android ChromeでPWAとしてインストールできない問題を修正
|
||||
- 未知のユーザーが deleteActor されたら処理をスキップする
|
||||
- fix(server): notes/createで、fileIdsと見つかったファイルの数が異なる場合はエラーにする
|
||||
- fix(server): エラーのスタックトレースは返さないように
|
||||
|
||||
## 13.7.5 (2023/02/24)
|
||||
|
||||
|
@ -103,6 +103,8 @@ renoted: "Renoté !"
|
||||
cantRenote: "Ce message ne peut pas être renoté."
|
||||
cantReRenote: "Impossible de renoter une Renote."
|
||||
quote: "Citer"
|
||||
inChannelRenote: "Renoter dans le canal"
|
||||
inChannelQuote: "Citer dans le canal"
|
||||
pinnedNote: "Note épinglée"
|
||||
pinned: "Épingler sur le profil"
|
||||
you: "Vous"
|
||||
@ -129,6 +131,7 @@ unblockConfirm: "Êtes-vous sûr·e de vouloir débloquer ce compte ?"
|
||||
suspendConfirm: "Êtes-vous sûr·e de vouloir suspendre ce compte ?"
|
||||
unsuspendConfirm: "Êtes-vous sûr·e de vouloir annuler la suspension de ce compte ?"
|
||||
selectList: "Sélectionner une liste"
|
||||
selectChannel: "Sélectionner un canal"
|
||||
selectAntenna: "Sélectionner une antenne"
|
||||
selectWidget: "Sélectionner un widget"
|
||||
editWidgets: "Modifier les widgets"
|
||||
@ -898,6 +901,17 @@ show: "Affichage"
|
||||
neverShow: "Ne plus afficher"
|
||||
remindMeLater: "Peut-être plus tard"
|
||||
color: "Couleur"
|
||||
_achievements:
|
||||
_types:
|
||||
_notes100000:
|
||||
title: "ALL YOUR NOTE ARE BELONG TO US"
|
||||
_login1000:
|
||||
flavor: "Merci d'utiliser Misskey !"
|
||||
_markedAsCat:
|
||||
title: "Je suis un chat"
|
||||
flavor: "Je n'ai pas encore de nom"
|
||||
_following50:
|
||||
title: "Beaucoup d'amis"
|
||||
_role:
|
||||
priority: "Priorité"
|
||||
_priority:
|
||||
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"version": "13.7.5-simkey",
|
||||
"version": "13.8.0-simkey",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -55,11 +55,11 @@
|
||||
"devDependencies": {
|
||||
"@types/gulp": "4.0.10",
|
||||
"@types/gulp-rename": "2.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.52.0",
|
||||
"@typescript-eslint/parser": "5.52.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.53.0",
|
||||
"@typescript-eslint/parser": "5.53.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "12.6.0",
|
||||
"eslint": "8.34.0",
|
||||
"cypress": "12.7.0",
|
||||
"eslint": "8.35.0",
|
||||
"start-server-and-test": "1.15.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {loadConfig} from './built/config.js';
|
||||
import {createRedisConnection} from "./built/redis.js";
|
||||
import { loadConfig } from './built/config.js';
|
||||
import { createRedisConnection } from './built/redis.js';
|
||||
|
||||
const config = loadConfig();
|
||||
const redis = createRedisConnection(config);
|
||||
|
||||
redis.on('connect', () => redis.disconnect());
|
||||
redis.on('error', (e) => {
|
||||
throw e;
|
||||
throw e;
|
||||
});
|
||||
|
@ -80,7 +80,7 @@
|
||||
"fluent-ffmpeg": "2.1.2",
|
||||
"form-data": "4.0.0",
|
||||
"got": "12.5.3",
|
||||
"happy-dom": "^8.7.0",
|
||||
"happy-dom": "8.9.0",
|
||||
"hpagent": "1.2.0",
|
||||
"ioredis": "4.28.5",
|
||||
"ip-cidr": "3.1.0",
|
||||
@ -88,7 +88,7 @@
|
||||
"js-yaml": "4.1.0",
|
||||
"jsdom": "21.1.0",
|
||||
"json5": "2.2.3",
|
||||
"jsonld": "8.1.0",
|
||||
"jsonld": "8.1.1",
|
||||
"jsrsasign": "10.6.1",
|
||||
"mfm-js": "0.23.3",
|
||||
"mime-types": "2.1.35",
|
||||
@ -127,7 +127,7 @@
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"stringz": "2.1.0",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"systeminformation": "5.17.9",
|
||||
"systeminformation": "5.17.10",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tmp": "0.2.1",
|
||||
"tsc-alias": "1.8.2",
|
||||
@ -156,7 +156,7 @@
|
||||
"@types/color-convert": "2.0.0",
|
||||
"@types/content-disposition": "0.5.5",
|
||||
"@types/escape-regexp": "0.0.1",
|
||||
"@types/fluent-ffmpeg": "2.1.20",
|
||||
"@types/fluent-ffmpeg": "2.1.21",
|
||||
"@types/ioredis": "4.28.10",
|
||||
"@types/jest": "29.4.0",
|
||||
"@types/js-yaml": "4.0.5",
|
||||
@ -164,7 +164,7 @@
|
||||
"@types/jsonld": "1.5.8",
|
||||
"@types/jsrsasign": "10.5.5",
|
||||
"@types/mime-types": "2.1.1",
|
||||
"@types/node": "18.14.0",
|
||||
"@types/node": "18.14.1",
|
||||
"@types/node-fetch": "3.0.3",
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"@types/oauth": "0.9.1",
|
||||
@ -183,18 +183,18 @@
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"@types/tmp": "0.2.3",
|
||||
"@types/unzipper": "0.10.5",
|
||||
"@types/uuid": "9.0.0",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@types/vary": "1.1.0",
|
||||
"@types/web-push": "3.3.2",
|
||||
"@types/websocket": "1.0.5",
|
||||
"@types/ws": "8.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "5.52.0",
|
||||
"@typescript-eslint/parser": "5.52.0",
|
||||
"@typescript-eslint/parser": "5.53.0",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "8.34.0",
|
||||
"eslint": "8.35.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"execa": "6.1.0",
|
||||
"jest": "29.4.3",
|
||||
"jest-mock": "29.4.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { pipeline } from 'node:stream';
|
||||
import * as fs from 'node:fs';
|
||||
import { promisify } from 'node:util';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { getIpHash } from '@/misc/get-ip-hash.js';
|
||||
import type { LocalUser, User } from '@/models/entities/User.js';
|
||||
@ -320,6 +321,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||
if (err instanceof ApiError) {
|
||||
throw err;
|
||||
} else {
|
||||
const errId = uuid();
|
||||
this.logger.error(`Internal error occurred in ${ep.name}: ${err.message}`, {
|
||||
ep: ep.name,
|
||||
ps: data,
|
||||
@ -327,14 +329,15 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||
message: err.message,
|
||||
code: err.name,
|
||||
stack: err.stack,
|
||||
id: errId,
|
||||
},
|
||||
});
|
||||
console.error(err);
|
||||
console.error(err, errId);
|
||||
throw new ApiError(null, {
|
||||
e: {
|
||||
message: err.message,
|
||||
code: err.name,
|
||||
stack: err.stack,
|
||||
id: errId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -235,6 +235,21 @@ describe('api:notes/create', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('renote', () => {
|
||||
test('just a renote', () => {
|
||||
expect(v({ renoteId: '1' }))
|
||||
.toBe(VALID);
|
||||
});
|
||||
test('just a quote', () => {
|
||||
expect(v({ text: 'Hello, world!', renoteId: '1' }))
|
||||
.toBe(VALID);
|
||||
});
|
||||
test('reject invalid renoteId', () => {
|
||||
expect(v({ renoteId: 'あ' }))
|
||||
.toBe(INVALID);
|
||||
});
|
||||
});
|
||||
|
||||
test('text, fileIds and poll', () => {
|
||||
expect(v({ text: 'Hello, world!', fileIds: ['1', '2', '3'], poll: { choices: ['a', 'b', 'c'] } }))
|
||||
.toBe(VALID);
|
||||
|
@ -147,6 +147,7 @@ export const paramDef = {
|
||||
// (re)note with text, files and poll are optional
|
||||
anyOf: [
|
||||
{ required: ['text'] },
|
||||
{ required: ['renoteId'] },
|
||||
{ required: ['fileIds'] },
|
||||
{ required: ['mediaIds'] },
|
||||
{ required: ['poll'] },
|
||||
|
@ -58,25 +58,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
private activeUsersChart: ActiveUsersChart,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const hasFollowing = (await this.followingsRepository.count({
|
||||
where: {
|
||||
followerId: me.id,
|
||||
},
|
||||
take: 1,
|
||||
})) !== 0;
|
||||
const followees = await this.followingsRepository.createQueryBuilder('following')
|
||||
.select('following.followeeId')
|
||||
.where('following.followerId = :followerId', { followerId: me.id })
|
||||
.getMany();
|
||||
|
||||
//#region Construct query
|
||||
const followingQuery = this.followingsRepository.createQueryBuilder('following')
|
||||
.select('following.followeeId')
|
||||
.where('following.followerId = :followerId', { followerId: me.id });
|
||||
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.andWhere('note.createdAt > :minDate', { minDate: new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)) }) // 30日前まで
|
||||
.andWhere(new Brackets(qb => { qb
|
||||
.where('note.userId = :meId', { meId: me.id });
|
||||
if (hasFollowing) qb.orWhere(`note.userId IN (${ followingQuery.getQuery() })`);
|
||||
}))
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('user.avatar', 'avatar')
|
||||
.leftJoinAndSelect('user.banner', 'banner')
|
||||
@ -87,8 +77,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
.leftJoinAndSelect('replyUser.banner', 'replyUserBanner')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('renoteUser.avatar', 'renoteUserAvatar')
|
||||
.leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner')
|
||||
.setParameters(followingQuery.getParameters());
|
||||
.leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner');
|
||||
|
||||
if (followees.length > 0) {
|
||||
const meOrFolloweeIds = [me.id, ...followees.map(f => f.followeeId)];
|
||||
|
||||
query.andWhere('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds });
|
||||
} else {
|
||||
query.andWhere('note.userId = :meId', { meId: me.id });
|
||||
}
|
||||
|
||||
this.queryService.generateChannelQuery(query, me);
|
||||
this.queryService.generateRepliesQuery(query, me);
|
||||
|
@ -42,12 +42,12 @@
|
||||
"mfm-js": "git+https://github.com/sim1222/mfm.js.git",
|
||||
"misetehoshii": "https://github.com/melt-adzuki/misetehoshii",
|
||||
"misskey-js": "0.0.15",
|
||||
"photoswipe": "5.3.5",
|
||||
"photoswipe": "5.3.6",
|
||||
"prismjs": "1.29.0",
|
||||
"punycode": "2.3.0",
|
||||
"querystring": "0.2.1",
|
||||
"rndstr": "1.0.0",
|
||||
"rollup": "3.17.2",
|
||||
"rollup": "3.17.3",
|
||||
"s-age": "1.1.2",
|
||||
"sanitize-html": "2.10.0",
|
||||
"sass": "1.58.3",
|
||||
@ -55,7 +55,7 @@
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"syuilo-password-strength": "0.0.1",
|
||||
"textarea-caret": "3.1.0",
|
||||
"three": "0.149.0",
|
||||
"three": "0.150.0",
|
||||
"throttle-debounce": "5.0.0",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tsc-alias": "1.8.2",
|
||||
@ -64,7 +64,7 @@
|
||||
"typescript": "4.9.5",
|
||||
"uuid": "9.0.0",
|
||||
"vanilla-tilt": "1.8.0",
|
||||
"vite": "4.1.2",
|
||||
"vite": "4.1.4",
|
||||
"vue": "3.2.47",
|
||||
"vue-plyr": "7.0.0",
|
||||
"vue-prism-editor": "2.0.0-alpha.2",
|
||||
@ -72,29 +72,28 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/escape-regexp": "0.0.1",
|
||||
"@types/glob": "8.0.1",
|
||||
"@types/gulp": "4.0.10",
|
||||
"@types/gulp-rename": "2.0.1",
|
||||
"@types/matter-js": "0.18.2",
|
||||
"@types/node": "18.14.0",
|
||||
"@types/node": "18.14.1",
|
||||
"@types/punycode": "2.1.0",
|
||||
"@types/sanitize-html": "2.8.0",
|
||||
"@types/seedrandom": "3.0.4",
|
||||
"@types/seedrandom": "3.0.5",
|
||||
"@types/throttle-debounce": "5.0.0",
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"@types/uuid": "9.0.0",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@types/websocket": "1.0.5",
|
||||
"@types/ws": "8.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "5.52.0",
|
||||
"@typescript-eslint/parser": "5.52.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.53.0",
|
||||
"@typescript-eslint/parser": "5.53.0",
|
||||
"@vue/runtime-core": "3.2.47",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "12.6.0",
|
||||
"eslint": "8.34.0",
|
||||
"cypress": "12.7.0",
|
||||
"eslint": "8.35.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-vue": "9.9.0",
|
||||
"start-server-and-test": "1.15.4",
|
||||
"vue-eslint-parser": "9.1.0",
|
||||
"vue-tsc": "1.1.4"
|
||||
"vue-tsc": "1.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
659
pnpm-lock.yaml
generated
659
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
packages:
|
||||
- 'packages/backend'
|
||||
- 'packages/frontend'
|
||||
- 'packages/sw'
|
||||
- 'packages/sw'
|
||||
|
Loading…
x
Reference in New Issue
Block a user