feat(chat,board): file/image attachments on chat, board threads and comments
チャット・掲示板(スレッド/コメント)へファイル/画像添付を追加。 - lib/db/migrations/002_attachments.sql: attachments テーブル + file_assets.source 列 - repositories/AttachmentRepository + services/AttachmentService: 添付紐付け(プロジェクト/アップロード者チェック) - FileStorageService.uploadForAttachment: 通知/SSE/アクティビティを行わない添付専用アップロード(source='attachment') - ChatService/BoardService: fileIds 受理・添付紐付け・履歴/詳細表示・削除クリーンアップ(トランザクション) - API: POST /attachments + chat/board の fileIds 受理 - UI: AttachmentList(画像サムネイル+Lightbox/ダウンロード) + AttachmentPicker(複数アップロード・送信中は送信不可) をチャット/スレッド/コメントに統合 - 添付ファイルは既存の /api/files/[fileId]/download(権限チェック済)で配信
This commit is contained in:
@ -44,7 +44,10 @@ describe('SseHub', () => {
|
||||
|
||||
hub.broadcast(1, {
|
||||
type: 'chat.message.created',
|
||||
data: { projectId: 1, message: { id: 1 } as never },
|
||||
data: {
|
||||
projectId: 1,
|
||||
message: { id: 1, attachments: [] } as never,
|
||||
},
|
||||
});
|
||||
|
||||
expect(a1.received).toHaveLength(1);
|
||||
|
||||
Reference in New Issue
Block a user