fix status missing in mastodon post
This commit is contained in:
parent
bb6e7dccb6
commit
31ba670c84
2 changed files with 2 additions and 3 deletions
|
@ -1092,7 +1092,7 @@ class Mark:
|
|||
def shelf(self):
|
||||
return self.shelfmember.parent if self.shelfmember else None
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def shelf_type(self):
|
||||
return self.shelfmember.parent.shelf_type if self.shelfmember else None
|
||||
|
||||
|
@ -1229,7 +1229,6 @@ class Mark:
|
|||
if self.shelfmember.metadata and not share_as_new_post
|
||||
else None
|
||||
)
|
||||
self.translated_status = self.action_label
|
||||
self.save = lambda **args: None
|
||||
if not share_mark(self):
|
||||
raise ValueError("sharing failed")
|
||||
|
|
|
@ -447,7 +447,7 @@ def share_mark(mark):
|
|||
mark.rating_grade,
|
||||
MastodonApplication.objects.get(domain_name=user.mastodon_site).star_mode,
|
||||
)
|
||||
content = f"{mark.translated_status}《{mark.item.title}》{stars}\n{mark.item.absolute_url}\n{mark.comment_text or ''}{tags}"
|
||||
content = f"{mark.action_label}《{mark.item.title}》{stars}\n{mark.item.absolute_url}\n{mark.comment_text or ''}{tags}"
|
||||
update_id = get_status_id_by_url(mark.shared_link)
|
||||
spoiler_text, content = get_spoiler_text(content, mark.item)
|
||||
response = post_toot(
|
||||
|
|
Loading…
Add table
Reference in a new issue