Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Apr 2, 2022
2 parents 2375359 + 7722fc4 commit 5abe05d
Show file tree
Hide file tree
Showing 33 changed files with 106 additions and 295 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
You should also include the user name that made the change.
-->

## 12.109.1 (2022/04/02)

### Bugfixes
- API: Renoteが行えない問題を修正

## 12.109.0 (2022/04/02)

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "12.109.0",
"version": "12.109.1",
"codename": "indigo",
"repository": {
"type": "git",
Expand Down
1 change: 0 additions & 1 deletion packages/backend/src/models/schema/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const packedEmojiSchema = {
host: {
type: 'string',
optional: false, nullable: true,
description: 'The local host is represented with `null`.',
},
url: {
type: 'string',
Expand Down
1 change: 0 additions & 1 deletion packages/backend/src/models/schema/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const packedUserLiteSchema = {
type: 'string',
nullable: true, optional: false,
example: 'misskey.example.com',
description: 'The local host is represented with `null`.',
},
avatarUrl: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) },
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" },
hostname: {
type: 'string',
nullable: true,
default: null,
description: 'The local host is represented with `null`.',
},
hostname: { type: 'string', nullable: true, default: null },
},
required: [],
} as const;
Expand Down
20 changes: 5 additions & 15 deletions packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const meta = {
userHost: {
type: 'string',
optional: false, nullable: true,
description: 'The local host is represented with `null`.',
},
md5: {
type: 'string',
Expand Down Expand Up @@ -152,20 +151,11 @@ export const meta = {

export const paramDef = {
type: 'object',
anyOf: [
{
properties: {
fileId: { type: 'string', format: 'misskey:id' },
},
required: ['fileId'],
},
{
properties: {
url: { type: 'string' },
},
required: ['url'],
},
],
properties: {
fileId: { type: 'string', format: 'misskey:id' },
url: { type: 'string' },
},
required: [],
} as const;

// eslint-disable-next-line import/no-default-export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const meta = {
host: {
type: 'string',
optional: false, nullable: true,
description: 'The local host is represented with `null`.',
},
url: {
type: 'string',
Expand All @@ -55,12 +54,7 @@ export const paramDef = {
type: 'object',
properties: {
query: { type: 'string', nullable: true, default: null },
host: {
type: 'string',
nullable: true,
default: null,
description: 'Use `null` to represent the local host.',
},
host: { type: 'string', nullable: true, default: null },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/server/api/endpoints/admin/emoji/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ export const meta = {
optional: false, nullable: true,
},
host: {
type: 'null',
optional: false,
description: 'The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files.',
type: 'string',
optional: false, nullable: true,
},
url: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export const paramDef = {
ids: { type: 'array', items: {
type: 'string', format: 'misskey:id',
} },
category: {
type: 'string',
nullable: true,
description: 'Use `null` to reset the category.',
},
category: { type: 'string', nullable: true },
},
required: ['ids'],
} as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ export const paramDef = {
properties: {
id: { type: 'string', format: 'misskey:id' },
name: { type: 'string' },
category: {
type: 'string',
nullable: true,
description: 'Use `null` to reset the category.',
},
category: { type: 'string', nullable: true },
aliases: { type: 'array', items: {
type: 'string',
} },
Expand Down
9 changes: 2 additions & 7 deletions packages/backend/src/server/api/endpoints/admin/show-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ export const paramDef = {
sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] },
state: { type: 'string', enum: ['all', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: "all" },
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" },
username: { type: 'string', nullable: true, default: null },
hostname: {
type: 'string',
nullable: true,
default: null,
description: 'The local host is represented with `null`.',
},
username: { type: 'string', default: null },
hostname: { type: 'string', default: null },
},
required: [],
} as const;
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/clips/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const paramDef = {
type: 'object',
properties: {
name: { type: 'string', minLength: 1, maxLength: 100 },
isPublic: { type: 'boolean', default: false },
isPublic: { type: 'boolean' },
description: { type: 'string', nullable: true, minLength: 1, maxLength: 2048 },
},
required: ['name'],
Expand Down
27 changes: 13 additions & 14 deletions packages/backend/src/server/api/endpoints/drive/files/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,22 @@ export const meta = {
code: 'ACCESS_DENIED',
id: '25b73c73-68b1-41d0-bad1-381cfdf6579f',
},

fileIdOrUrlRequired: {
message: 'fileId or url required.',
code: 'INVALID_PARAM',
id: '89674805-722c-440c-8d88-5641830dc3e4',
},
},
} as const;

export const paramDef = {
type: 'object',
anyOf: [
{
properties: {
fileId: { type: 'string', format: 'misskey:id' },
},
required: ['fileId'],
},
{
properties: {
url: { type: 'string' },
},
required: ['url'],
},
],
properties: {
fileId: { type: 'string', format: 'misskey:id' },
url: { type: 'string' },
},
required: [],
} as const;

// eslint-disable-next-line import/no-default-export
Expand All @@ -65,6 +62,8 @@ export default define(meta, paramDef, async (ps, user) => {
thumbnailUrl: ps.url,
}],
});
} else {
throw new ApiError(meta.errors.fileIdOrUrlRequired);
}

if (file == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const meta = {
export const paramDef = {
type: 'object',
properties: {
host: { type: 'string', nullable: true, description: 'Omit or use `null` to not filter by host.' },
host: { type: 'string', nullable: true },
blocked: { type: 'boolean', nullable: true },
notResponding: { type: 'boolean', nullable: true },
suspended: { type: 'boolean', nullable: true },
Expand Down
19 changes: 5 additions & 14 deletions packages/backend/src/server/api/endpoints/messaging/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,14 @@ export const meta = {
export const paramDef = {
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id' },
groupId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
markAsRead: { type: 'boolean', default: true },
},
anyOf: [
{
properties: {
userId: { type: 'string', format: 'misskey:id' },
},
required: ['userId'],
},
{
properties: {
groupId: { type: 'string', format: 'misskey:id' },
},
required: ['groupId'],
},
],
required: [],
} as const;

// eslint-disable-next-line import/no-default-export
Expand Down Expand Up @@ -137,5 +126,7 @@ export default define(meta, paramDef, async (ps, user) => {
return await Promise.all(messages.map(message => MessagingMessages.pack(message, user, {
populateGroup: false,
})));
} else {
throw new Error();
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,12 @@ export const meta = {
export const paramDef = {
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id' },
groupId: { type: 'string', format: 'misskey:id' },
text: { type: 'string', nullable: true, maxLength: 3000 },
fileId: { type: 'string', format: 'misskey:id' },
},
anyOf: [
{
properties: {
userId: { type: 'string', format: 'misskey:id' },
},
required: ['userId'],
},
{
properties: {
groupId: { type: 'string', format: 'misskey:id' },
},
required: ['groupId'],
},
],
required: [],
} as const;

// eslint-disable-next-line import/no-default-export
Expand Down
1 change: 0 additions & 1 deletion packages/backend/src/server/api/endpoints/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export const meta = {
host: {
type: 'string',
optional: false, nullable: true,
description: 'The local host is represented with `null`.',
},
url: {
type: 'string',
Expand Down
6 changes: 1 addition & 5 deletions packages/backend/src/server/api/endpoints/mute/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ export const paramDef = {
type: 'object',
properties: {
userId: { type: 'string', format: 'misskey:id' },
expiresAt: {
type: 'integer',
nullable: true,
description: 'A Unix Epoch timestamp that must lie in the future. `null` means an indefinite mute.',
},
expiresAt: { type: 'integer', nullable: true },
},
required: ['userId'],
} as const;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const meta = {
export const paramDef = {
type: 'object',
properties: {
local: { type: 'boolean', default: false },
local: { type: 'boolean' },
reply: { type: 'boolean' },
renote: { type: 'boolean' },
withFiles: { type: 'boolean' },
Expand Down
Loading

0 comments on commit 5abe05d

Please sign in to comment.