Files
SnowLuma/packages
DrSmoothl d983635c8f refactor(onebot): inline ctx.bridge.apis.profile/web/groupAlbum direct calls
Remove the remaining ~20 passthrough fields from ApiActionContext
spanning four Api areas — most were already dead (no caller) since
extended.ts had migrated to direct `ctx.bridge.apis.X` paths in
earlier #6 commits.

  profile area:
    - setProfile / setOnlineStatus / fetchCustomFace /
      setGroupAvatar     ── all already dead
    - getProfileLike    ── one live caller in extended.ts inlined

  web area:
    - getGroupHonorInfo / getGroupEssence / getGroupEssenceAll /
      sendGroupNotice / getGroupNotice / deleteGroupNotice /
      getCookiesStr / getCsrfToken / getCredentials /
      forceFetchClientKey  ── all already dead

  groupAlbum area:
    - getGroupAlbumList / uploadImageToGroupAlbum /
      getGroupAlbumMediaList / commentGroupAlbumMedia /
      deleteGroupAlbumMedia / likeGroupAlbumMedia  ── all 7 live
      callers in actions/group-album.ts inlined to
      `ctx.bridge.apis.groupAlbum.<m>(...)`

  friend area:
    - setFriendRemark   ── already dead

Behavior preserved: getProfileLike's `userId = 0 → self` semantics
keep working because ProfileApi.getLike uses `isSelf = !userId`
internally (0 and undefined are equivalent for that check); same
default args at the action site (`start = 0`, `count = 10`).

Group-album action handlers now wrap the typed Api return values
(GroupAlbumMediaResult, GroupAlbumCommentResult) with
`as unknown as JsonValue` for okResponse compatibility — the old
ctx wrapper was typed `Promise<any>` which silently hid the cast;
making the cast explicit doesn't change runtime.

Part 4 of the OneBot-side slim-down. 552/552 tests still green.
2026-05-21 09:29:28 +08:00
..
2026-05-20 14:21:03 +08:00
2026-05-20 14:21:03 +08:00