Skip to content

feat: はなみすきーの notes/hanamisearch-v1 に対応 - #50

Merged
hitalin merged 1 commit into
developfrom
feat/hanamisearch-v1
Aug 2, 2026
Merged

feat: はなみすきーの notes/hanamisearch-v1 に対応#50
hitalin merged 1 commit into
developfrom
feat/hanamisearch-v1

Conversation

@hitalin

@hitalin hitalin commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

なぜ

はなみすきー (misskey.flowers) はロールポリシー canSearchNotes: false で本家 notes/search を無効化しており、search_notes() が常に UNAVAILABLE を返す。代わりに canSearchWithHanamiSearchV1: truenotes/hanamisearch-v1 が全ログインユーザーに開放されている。

なにを

MisskeyClient::search_notes_hanami() を追加。

  • エンドポイント: notes/hanamisearch-v1
  • sinceDate / untilDate は非対応なので、Misskey ID の時刻部 (2000-01-01 起点 ms の base36 8 桁) に変換して sinceId / untilId に載せる。サーバー側は idService.parse() で createdAt に戻して比較しているのでこれで日付フィルタとして機能する
  • ページング用の sinceId / untilId が明示されていればそちらを優先する

エンコードは misskey.flowers の実 ID (apfldnaym0v100e3 / 2026-08-02T16:41:40.666Z) で検証済み。

呼び出し側の出し分けは NoteDeck 側 (notedeck-dev/notedeck#916 / #917) のアダプター層で行う。

テスト

  • misskey_id_at_encodes_time_part — 時刻部エンコード
  • search_notes_hanami_uses_hanamisearch_endpoint — エンドポイントと日付→ID 変換
  • search_notes_hanami_prefers_explicit_pagination_ids — untilId 優先

🤖 Generated with Claude Code

はなみすきー (hanamisskey/misskey) はロールポリシー canSearchNotes が
false で本家 notes/search が常に UNAVAILABLE を返すため、独自エンドポイント
notes/hanamisearch-v1 を叩く search_notes_hanami() を追加する。

このエンドポイントは sinceDate/untilDate を受け付けないが、サーバー側で
sinceId/untilId を idService.parse() で createdAt に戻して比較しているため、
日付を Misskey ID の時刻部 (base36 8 桁) に変換して渡すことで代替する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94fc42b0-dcf0-4c47-a691-df6742fcacbf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@hitalin
hitalin merged commit a85c34c into develop Aug 2, 2026
4 checks passed
@hitalin
hitalin deleted the feat/hanamisearch-v1 branch August 2, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant