Format change in toots
Build LinkLog Development Image / development-image (push) Successful in 13s
Release LinkLog / release (push) Failing after 9s

This commit is contained in:
2026-08-26 22:30:07 +02:00
parent fa6d88a768
commit 583026418d
4 changed files with 18 additions and 2 deletions
+3 -1
View File
@@ -68,7 +68,9 @@ class MastodonPlugin(BasePlugin):
post_prefix = f'#{str(config["hashtag"]).strip().lstrip("#")} '
post_prefix = str(post_prefix if post_prefix is not None else DEFAULT_POST_PREFIX).strip()
title = str(event.get('title') or '').strip()
status_parts = [f'{post_prefix} {title}'.strip()]
status_parts = [post_prefix.strip()]
if title:
status_parts.append(title)
if event.get('comment'):
status_parts.append(event['comment'])
if title:
+1 -1
View File
@@ -796,7 +796,7 @@ def test_link_submission_posts_to_enabled_mastodon_plugin():
assert received['path'] == '/api/v1/statuses'
assert received['authorization'] == 'Bearer test-token'
assert received['content_type'] == 'application/x-www-form-urlencoded'
assert received['body'] == {'status': ['From my #LinkLog: A useful page\n\nWorth sharing\n\nfrom: https://example.com/useful\n\n#python #web']}
assert received['body'] == {'status': ['From my #LinkLog:\n\nA useful page\n\nWorth sharing\n\nfrom: https://example.com/useful\n\n#python #web']}
posted_item = next(item for item in client.get('/api/public/feed/alice', headers=headers).json() if item['id'] == response.json()['id'])
assert posted_item['mastodon_posted'] is True
finally: