summaryrefslogtreecommitdiff
path: root/packages/backend/src/models
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-04-03 22:04:11 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-04-03 22:06:37 -0400
commit3eeb53ff63a5e776327a9fd067d0c74b9dc727f4 (patch)
tree9b4ee01e1aaf1ab7b4a24ab897ccf14e1aa19a40 /packages/backend/src/models
parentrefactor bubble-timeline.ts to match global-timeline.ts and local-timeline.ts (diff)
parentNew Crowdin updates (#15740) (diff)
downloadsharkey-3eeb53ff63a5e776327a9fd067d0c74b9dc727f4.tar.gz
sharkey-3eeb53ff63a5e776327a9fd067d0c74b9dc727f4.tar.bz2
sharkey-3eeb53ff63a5e776327a9fd067d0c74b9dc727f4.zip
Merge branch 'misskey-develop' into merge/2025-03-24
# Conflicts: # package.json # packages/backend/src/core/AccountMoveService.ts # packages/frontend/src/components/MkDateSeparatedList.vue # packages/misskey-js/etc/misskey-js.api.md # pnpm-lock.yaml
Diffstat (limited to 'packages/backend/src/models')
-rw-r--r--packages/backend/src/models/Role.ts5
-rw-r--r--packages/backend/src/models/json-schema/chat-message.ts112
-rw-r--r--packages/backend/src/models/json-schema/role.ts5
3 files changed, 121 insertions, 1 deletions
diff --git a/packages/backend/src/models/Role.ts b/packages/backend/src/models/Role.ts
index a173971b2c..4c7da252bd 100644
--- a/packages/backend/src/models/Role.ts
+++ b/packages/backend/src/models/Role.ts
@@ -251,6 +251,11 @@ export class MiRole {
@Column('boolean', {
default: false,
})
+ public preserveAssignmentOnMoveAccount: boolean;
+
+ @Column('boolean', {
+ default: false,
+ })
public canEditMembersByModerator: boolean;
// UIに表示する際の並び順用(大きいほど先頭)
diff --git a/packages/backend/src/models/json-schema/chat-message.ts b/packages/backend/src/models/json-schema/chat-message.ts
index 44b7298702..3b5e85ab69 100644
--- a/packages/backend/src/models/json-schema/chat-message.ts
+++ b/packages/backend/src/models/json-schema/chat-message.ts
@@ -72,7 +72,7 @@ export const packedChatMessageSchema = {
},
user: {
type: 'object',
- optional: true, nullable: true,
+ optional: false, nullable: false,
ref: 'UserLite',
},
},
@@ -144,3 +144,113 @@ export const packedChatMessageLiteSchema = {
},
},
} as const;
+
+export const packedChatMessageLiteFor1on1Schema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ createdAt: {
+ type: 'string',
+ format: 'date-time',
+ optional: false, nullable: false,
+ },
+ fromUserId: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ toUserId: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ text: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ fileId: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ file: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'DriveFile',
+ },
+ reactions: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ reaction: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ },
+ },
+ },
+} as const;
+
+export const packedChatMessageLiteForRoomSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ createdAt: {
+ type: 'string',
+ format: 'date-time',
+ optional: false, nullable: false,
+ },
+ fromUserId: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ fromUser: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ toRoomId: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ text: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ fileId: {
+ type: 'string',
+ optional: true, nullable: true,
+ },
+ file: {
+ type: 'object',
+ optional: true, nullable: true,
+ ref: 'DriveFile',
+ },
+ reactions: {
+ type: 'array',
+ optional: false, nullable: false,
+ items: {
+ type: 'object',
+ optional: false, nullable: false,
+ properties: {
+ reaction: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ user: {
+ type: 'object',
+ optional: false, nullable: false,
+ ref: 'UserLite',
+ },
+ },
+ },
+ },
+ },
+} as const;
diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts
index 2537351dc0..285c10c4bd 100644
--- a/packages/backend/src/models/json-schema/role.ts
+++ b/packages/backend/src/models/json-schema/role.ts
@@ -397,6 +397,11 @@ export const packedRoleSchema = {
optional: false, nullable: false,
example: false,
},
+ preserveAssignmentOnMoveAccount: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ example: false,
+ },
canEditMembersByModerator: {
type: 'boolean',
optional: false, nullable: false,