Skip to content

Misskey chat: ファイル添付 (DriveSupport ダイアログ流用) #613

Closed

Description

@pooza

概要

Misskey chat の DM / ルーム両方にファイル添付を実装する。`POST /api/chat/messages/create-to-{user,room}` の `fileId` パラメータは既に capsicum クライアント (`MisskeyClient`) と `ChatSupport.sendUserMessage` / `sendRoomMessage` の signature に存在するが、UI から fileId を渡す経路がない。

背景

`#248` (DM, v1.22) も `#438` (ルーム, v1.28) も「DriveSupport ダイアログ流用が必要」と保留で着手し、本機能を含まずに完了している。本 Issue で DM・ルーム共通機能として後追い実装する。

スコープ

  • compose row に添付ボタンを追加 (DM 画面 / ルーム画面 共通)
  • タップで Misskey ドライブから既存ファイル選択ダイアログを表示 (既に他箇所で実装済の DriveSupport picker を流用)
  • 端末からの新規アップロードも UI 動線として用意 (ドライブにアップロード → fileId 取得 → メッセージに添付の 2 ステップでよい)
  • 送信時に fileId を `sendUserMessage` / `sendRoomMessage` に渡す
  • 受信メッセージ側の Attachment 表示は既に実装済 (`_FilePreview`)

着手前提

関連

Activity

  1. added
    enhancement
    Misskey
    on May 23, 2026
  2. modified the milestones: v1.30, v1.36 on May 26, 2026
  3. pooza commented on Jun 11, 2026

    @pooza
    OwnerAuthor

    develop で実装・検証完了(macOS debug でダイスキーの DM/ルームを確認)。

    • ChatThreadNotifier.send / ChatRoomTimelineNotifier.send に fileId を追加(添付のみ=テキスト空の送信も可)
    • 共用 ChatComposeRow を新設し DM・ルームの個別 _ComposeRow を統合(重複解消)。添付ボタン + 添付プレビュー(×で取消)を追加
    • showChatAttachmentPicker: 「ドライブから選択」(既存 DrivePickerScreen 流用)/「アップロード」(mediaPicker → uploadAttachment で drive に上げ fileId 取得)の 2 経路。1 メッセージ 1 ファイル
    • 受信側 Attachment 表示は既存 _FilePreview がそのまま処理

    実装: aa6ddc6

  4. added a commit that references this issue on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Misskeyenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions