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

-m doesn't work anymore #511

Open
snan opened this issue Nov 28, 2024 · 6 comments
Open

-m doesn't work anymore #511

snan opened this issue Nov 28, 2024 · 6 comments

Comments

@snan
Copy link
Contributor

snan commented Nov 28, 2024

I use -rm all the time and have a couple of scripts that depend on it also; now I get a deprecation message but -rt mention doesn't work either. Neither -rm nor -rt mention seem to filter out likes.

@ihabunek
Copy link
Owner

What command is that?

@snan
Copy link
Contributor Author

snan commented Nov 28, 2024 via email

@snan
Copy link
Contributor Author

snan commented Nov 28, 2024 via email

@ihabunek
Copy link
Owner

I cannot reproduce this so I'm guessing this is due to the server you're connecting to not supporting the types query parameter for the notifications endpoint. This parameter was added in Mastodon 3.5.0 from March 2022, but possible not all implementations have picked it up.

The way --mentions used to work was to use the exclude_types parameter (which was available since the beginning of mastodon) and exclude everything but the mentions, but this was not ideal because new types were being added so they would leak through if the exclude list was not updated. So I changed it to use the types=mention parameter instead of excluding in commit 20eec3b.

To get the exact same behaviour as before you can exclude the types you don't want, e.g.

toot notifications -e follow -e favourite -e reblog -e poll -e follow_request

Which is not nice, but if it's used in scripts maybe it's fine?

I did some digging, and you're running Akkoma which does not support the types query parameter, but does support their custom variant include_types. They added this since it was not available in Mastodon, and then never added support for types once it was added.
https://docs.akkoma.dev/stable/development/API/differences_in_mastoapi_responses/#get-apiv1notifications

I started to report an issue, but I'm unsure if this should be reported to Akkoma or Pleroma on which it's based.

@ihabunek
Copy link
Owner

ihabunek commented Nov 29, 2024

Since you already have a hacks branch, you could modify this line.

From:

    params = {"types[]": types, "exclude_types[]": exclude_types, "limit": limit}

To:

    params = {"include_types[]": types, "exclude_types[]": exclude_types, "limit": limit}

And that should temporarily solve your issues.

@snan
Copy link
Contributor Author

snan commented Nov 29, 2024 via email

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

2 participants