Skip to content

fix: Fix v2.media.create not working with $raw#1376

Merged
neet merged 1 commit into
mainfrom
fix-raw-v2-create-media
Dec 6, 2025
Merged

fix: Fix v2.media.create not working with $raw#1376
neet merged 1 commit into
mainfrom
fix-raw-v2-create-media

Conversation

@neet

@neet neet commented Dec 5, 2025

Copy link
Copy Markdown
Owner

Closes #1375

Copilot AI review requested due to automatic review settings December 5, 2025 01:21
@github-actions

github-actions Bot commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
rest 3.9 KB (+0.81% 🔺)
streaming 3.86 KB (0%)
oauth 3.9 KB (+0.76% 🔺)

@pkg-pr-new

pkg-pr-new Bot commented Dec 5, 2025

Copy link
baa06d9_ " data-view-component="true" class="dropdown-item btn-link"> Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/neet/masto.js/masto@1376

commit: baa06d9

@neet neet changed the title fix: Fix v2.media.create nor working with $raw fix: Fix v2.media.create not working with $raw Dec 5, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to fix an issue where v2.media.create doesn't work correctly with the $raw parameter. The fix modifies the afterDispatch method to handle HttpResponse objects and properly preserve headers when returning media attachment results.

Key Changes:

  • Made afterDispatch method async to properly handle awaited media attachment polling
  • Updated result handling to work with HttpResponse structure instead of raw data
  • Added HttpResponse type import to support the new typing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/adapters/action/dispatcher-http-hook-mastodon.ts Outdated
@neet neet force-pushed the fix-raw-v2-create-media branch 2 times, most recently from ba22f23 to 24777d6 Compare December 5, 2025 15:34
@neet neet enabled auto-merge (squash) December 5, 2025 15:35
@neet neet disabled auto-merge December 5, 2025 15:35
@neet neet force-pushed the fix-raw-v2-create-media branch from 24777d6 to efbe475 Compare December 5, 2025 15:40
@neet neet force-pushed the fix-raw-v2-create-media branch from efbe475 to baa06d9 Compare December 5, 2025 15:41
@neet neet merged commit 7dbf15e into main Dec 6, 2025
7 checks passed
@neet neet deleted the fix-raw-v2-create-media branch December 6, 2025 01:29
@neet neet mentioned this pull request Dec 6, 2025
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.

Missing $raw method in v2.media.create

2 participants