diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-04-03 15:28:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-03 15:28:10 +0900 |
| commit | e07bb1dcbce6eaa2bfe157a6c9f1361dbf9aa280 (patch) | |
| tree | 1d9f9e6d6450caa717e83ca8fc0eadf09b413129 /packages/backend/src/models | |
| parent | perf(frontend): avoid main thread scroll repaint (diff) | |
| download | sharkey-e07bb1dcbce6eaa2bfe157a6c9f1361dbf9aa280.tar.gz sharkey-e07bb1dcbce6eaa2bfe157a6c9f1361dbf9aa280.tar.bz2 sharkey-e07bb1dcbce6eaa2bfe157a6c9f1361dbf9aa280.zip | |
fix: チャット周りの修正 (#15741)
* fix(misskey-js): チャットのChannel型定義を追加
* fix(backend); canChatで塞いでいない書き込み系のAPIを塞ぐ
* fix(frontend): チャット周りのフロントエンド型修正
* lint fix
* fix broken lockfile
* fix
* refactor
* wip
* wip
* wip
* clean up
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/json-schema/chat-message.ts | 112 |
1 files changed, 111 insertions, 1 deletions
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; |