Skip to content

refactor: download OpenGraph images locally before sending to prevent rich media transfer failure#7

Open
Rat0323 wants to merge 1 commit into
Soulter:masterfrom
Rat0323:fix-image-transfer-failed
Open

refactor: download OpenGraph images locally before sending to prevent rich media transfer failure#7
Rat0323 wants to merge 1 commit into
Soulter:masterfrom
Rat0323:fix-image-transfer-failed

Conversation

@Rat0323

@Rat0323 Rat0323 commented Jun 3, 2026

Copy link
Copy Markdown

This PR refactors how GitHub OpenGraph card images are sent. Currently, the plugin yields the raw external opengraph.githubassets.com URL to the message adapter. However, on OneBot11/NapCat platforms running in environment without global proxy settings, NapCat often fails to download the image from the blocked githubassets.com domain, resulting in EventChecker Failed: NodeIKernelMsgService/sendMsg (rich media transfer failed) error code 1200.

This PR downloads the OpenGraph card image locally to data/temp in Python using aiohttp (which natively respects environment proxies with trust_env=True), and yields the local file path to the message adapter. This ensures reliable image delivery on all platforms.

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