fix(chat): create-to-{user,room} の text/fileId を Option 化 + パラメータ名修正#11
Merged
Conversation
…chema に合わせて toUserId / toRoomId に修正 Misskey 新 Chat API #15686 のスキーマ: - パラメータ名は `toUserId` / `toRoomId` (`userId` / `roomId` ではない) - `text` と `fileId` は両方 nullable で、サーバ側で「どちらか一方は必須」を バリデーション (テキストなし & ファイルなしは contentRequired エラー) 旧シグネチャは `text: &str` 必須 + パラメータ名間違い (`userId` / `roomId`) で、 実呼び出されると失敗するか想定通りに動かなかった (NoteDeck 側からは呼ばれて おらず実害なし)。 notedeck の `messaging/messages/create` 404 エラー (Misskey v2025 で legacy 削除済み) を修正するため、本関数経由で新 API に切り替えるための前提整備。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Misskey 新 Chat API #15686 (
chat/messages/create-to-user/chat/messages/create-to-room) のスキーマに合わせて 2 点修正:userId/roomId→toUserId/toRoomId(Misskey の paramDef でこの名前が必須)旧シグネチャは内部から呼ばれていない (notedeck はずっと legacy
messaging/messages/createを経由していた) ため breaking 影響は無い。Why
notedeck で「新規メッセージ送信時に
messaging/messages/create(404)」が発生中。原因は Misskey v2025 で legacy messaging API が完全削除されているため。本 PR で新 API ラッパーを実用できる状態にし、続けて notedeck 側を新 API 経由に切り替える。Test plan
cargo build --features specta通過cargo test --features specta通過 (140 tests)