Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with media attachment uploads after upgrade to v3 of the client #119

Open
13xforever opened this issue Jan 16, 2024 · 0 comments
Open

Comments

@13xforever
Copy link

After upgrading from v2 to v3 I started to get exceptions like this:

Mastonet.ServerErrorException: Cannot attach files that have not finished processing. Try again in a moment!
   at Mastonet.BaseHttpClient.TryDeserialize[T](String json)
   at Mastonet.BaseHttpClient.Post[T](String route, IEnumerable`1 data, IEnumerable`1 media)
   at MeduzaRepost.MastodonWriter.TryToHandle(TgEvent evt) in /home/13xforever/meduza-bot/MeduzaRepost/Mastodon/MastodonWriter.cs:line 142

Looking for existing issues, I've seen #116 requesting support for async attachment uploads.

I'm not expert on Mastodon APIs, but as far as I understand, what happened is that mastonet library has moved from the synchronous obsolete API call v1 to the new asynchronous API v2 between v2 and v3 of the client (that's a speculation on my part).

Part of the async API is the ability to get media upload status/info meta, which is not implemented/exposed in mastonet client v3. As part of the GET call, Mastodon provides the ability to check media processing status (chiefly for video reencoding, but they're moving to async processing of all media if you look at the version history).

This is an issue because Mastodon does not allow posting new status with media attachments that have not finished processing yet, as evident by the returned error.

So, from my understanding, what we need is 1. exposing the GET API call for media attachments, and 2. as proposed in #116, to optionally provide a convenience method to wait for media processing to be complete

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

No branches or pull requests

1 participant