Skip to content

Fix adoption link not prioritized in Mastodon#99

Open
patrickZWY wants to merge 12 commits into
masterfrom
mastodon-fix-link
Open

Fix adoption link not prioritized in Mastodon#99
patrickZWY wants to merge 12 commits into
masterfrom
mastodon-fix-link

Conversation

@patrickZWY
Copy link
Copy Markdown
Collaborator

@patrickZWY patrickZWY commented May 7, 2026

Mastodon and the domain we use for Mastodon posting has a strict 500 word limit. Since Mastodon implementation uses default caption formatting in abstractions, it also puts the link below the body of the caption. When text goes near or over 500 word limit, then link gets buried. Prioritize the link by overriding the default function and rearranging it at the top.

Now also putting content exceeding 500 chars limit to comment section, max replies is 5, extra text beyond 5 replies will be truncated.

Also modify the manual testing for Mastodon and adding a preview test to reflect this.

Remove most unnecessary dependencies in requirements.txt

Comment thread requirements.txt
packaging==26.2
pluggy==1.6.0
Pygments==2.20.0
pytest==9.0.3
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest was not needed in requirements before i think

Comment thread manual_testing/mastodon_manual_test.py Outdated
from abstractions import AdoptablePet
from social_posters.mastodon import PosterMastodon

def postExceed500CharsLimitWithAdoptionLink():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python function should follow snake_case fyi as a convention

Comment thread manual_testing/mastodon_manual_test.py Outdated
from abstractions import AdoptablePet
from social_posters.mastodon import PosterMastodon

def postExceed500CharsLimitWithAdoptionLink():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def postExceed500CharsLimitWithAdoptionLink():
def post_exceed_500_chars_limit_with_adoption_link():

@patrickZWY
Copy link
Copy Markdown
Collaborator Author

gonna wait until my test account is recovered and i want to see how it looks in test account for my newly implemented comment section splitting thingy

@patrickZWY
Copy link
Copy Markdown
Collaborator Author

gonna wait until my test account is recovered and i want to see how it looks in test account for my newly implemented comment section splitting thingy

testing account recovery rejected. I will open a new account for testing purpose and this time significantly reduce manual testing and clean up after testing

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.

2 participants