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

unpin_misskey checks for wrong error code when note not found #109

Open
ssmucny opened this issue Jan 8, 2023 · 1 comment
Open

unpin_misskey checks for wrong error code when note not found #109

ssmucny opened this issue Jan 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ssmucny
Copy link

ssmucny commented Jan 8, 2023

At

if response.status_code == 404: # pragma
the response code is checked against 404 to see if the note cannot be found, but Misskey returns a 400 when no note is found. See https://misskey.io/api-doc#operation/i/unpin for API reference.

@robertoszek
Copy link
Owner

Hi!
You're absolutely right!
I completely missed this on my own testing as the end result was the same on my end due to another bug 😅 (so the bot gave up unpinning it and the post to unpin was already deleted, so no harm no foul there).

Thanks for bringing it to my attention!
I have committed the change (and the fix for the another bug) to the develop branch:
85cfbed

And I also have published it as a release candidate v1.2.1rc2, which anyone interested or who needs it right now can install like so:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.2.1rc2

Nevertheless, this change will be included on the next stable release, thanks once again for your contribution!

@robertoszek robertoszek added the bug Something isn't working label Jan 8, 2023
@robertoszek robertoszek self-assigned this Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants