fix edge cases for tags
This commit is contained in:
parent
2d729f61be
commit
f1289d486e
2 changed files with 4 additions and 4 deletions
|
@ -242,7 +242,7 @@ class Mark:
|
|||
post_as_new = shelf_type != last_shelf_type or visibility != last_visibility
|
||||
classic_repost = self.owner.user.preference.mastodon_repost_mode == 1
|
||||
append = (
|
||||
f" \n@{self.owner.user.mastodon_acct}"
|
||||
f"@{self.owner.user.mastodon_acct}\n"
|
||||
if visibility > 0 and share_to_mastodon and not classic_repost
|
||||
else ""
|
||||
)
|
||||
|
|
|
@ -589,10 +589,10 @@ class Takahe:
|
|||
|
||||
user = mark.owner.user
|
||||
tags = (
|
||||
"\n"
|
||||
+ user.preference.mastodon_append_tag.replace(
|
||||
user.preference.mastodon_append_tag.replace(
|
||||
"[category]", str(ItemCategory(mark.item.category).label)
|
||||
)
|
||||
+ "\n"
|
||||
if user.preference.mastodon_append_tag
|
||||
else ""
|
||||
)
|
||||
|
@ -603,7 +603,7 @@ class Takahe:
|
|||
f'{mark.action_label}<a href="{item_link}">《{mark.item.display_title}》</a>'
|
||||
)
|
||||
spoiler, txt = Takahe.get_spoiler_text(mark.comment_text, mark.item)
|
||||
content = f"{stars} \n{txt}{tags}"
|
||||
content = f"{stars} \n{txt}\n{tags}"
|
||||
data = {
|
||||
"object": {
|
||||
"tag": [mark.item.ap_object_ref],
|
||||
|
|
Loading…
Add table
Reference in a new issue