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

content_type is not ignored on incompatible servers #371

Open
crablab opened this issue Feb 14, 2024 · 2 comments
Open

content_type is not ignored on incompatible servers #371

crablab opened this issue Feb 14, 2024 · 2 comments

Comments

@crablab
Copy link

crablab commented Feb 14, 2024

From the documentation:

    **Specific to "pleroma" feature set:**: Specify `content_type` to set
    the content type of your post on Pleroma. It accepts 'text/plain' (default),
    'text/markdown', 'text/html' and 'text/bbcode'. This parameter is not
    supported on Mastodon servers, but will be safely ignored if set.

However, in the actual logic this is enforced very strictly:

if content_type is not None:

Expected behaviour: when setting this flag on an incompatible instance (eg. Mastodon) it's either sent to the server (which is safe?) or silently dropped. That way, clients of the library are abstracted from the underlying Mastodon server type.

Actual behaviour: exception is raised.

I'm happy to correct either the code or the docs. It's not clear to me which is the intended behaviour.

Apologies if I've got the wrong end of the stick.

@halcy
Copy link
Owner

halcy commented Feb 16, 2024

yeah I think the docs should be the behaviour we have (or, ideally: configurable at module level)

"not Mainline Mastodon" support is kind of a mess and needs to be reworked, probably, but if you want to go for a fix, I'd ask you to just take the check out

@crablab
Copy link
Author

crablab commented Feb 19, 2024

I'll aim to get a PR in today to remove the check :)

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