mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-22 07:07:52 +00:00
fix: bsky repost status
This commit is contained in:
parent
e8e6b08372
commit
fe78cf4006
@ -82,8 +82,8 @@ class Timeline:
|
|||||||
if (post.is_reply or post.is_quote) and post.parent_post:
|
if (post.is_reply or post.is_quote) and post.parent_post:
|
||||||
text += f"{post.parent_post.author.format} {post.parent_post.status}于 {post.parent_post.time_str}\n"
|
text += f"{post.parent_post.author.format} {post.parent_post.status}于 {post.parent_post.time_str}\n"
|
||||||
text += f"{post.author.format} {post.status}于 {post.time_str}\n"
|
text += f"{post.author.format} {post.status}于 {post.time_str}\n"
|
||||||
if post.is_repost:
|
if post.is_repost and post.repost_info:
|
||||||
text += f"{post.repost_info.by.format} {post.status}于 {post.repost_info.time_str}\n"
|
text += f"{post.repost_info.by.format} 转发于 {post.repost_info.time_str}\n"
|
||||||
text += f"点赞: {post.like_count} | 引用: {post.quote_count} | 回复: {post.reply_count} | 转发: {post.repost_count}"
|
text += f"点赞: {post.like_count} | 引用: {post.quote_count} | 回复: {post.reply_count} | 转发: {post.repost_count}"
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
@ -131,8 +131,6 @@ class HumanPost(BaseModel, frozen=False):
|
|||||||
return "引用"
|
return "引用"
|
||||||
elif self.is_reply:
|
elif self.is_reply:
|
||||||
return "回复"
|
return "回复"
|
||||||
elif self.is_repost:
|
|
||||||
return "转发"
|
|
||||||
return "发表"
|
return "发表"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -192,7 +190,8 @@ class HumanPost(BaseModel, frozen=False):
|
|||||||
elif data.reason:
|
elif data.reason:
|
||||||
is_repost = True
|
is_repost = True
|
||||||
repost_info = HumanRepostInfo(
|
repost_info = HumanRepostInfo(
|
||||||
by=HumanAuthor.parse(data.reason.by), at=data.reason.at
|
by=HumanAuthor.parse(data.reason.by),
|
||||||
|
at=data.reason.indexed_at,
|
||||||
)
|
)
|
||||||
elif data.post.embed and isinstance(data.post.embed, BskyViewRecord):
|
elif data.post.embed and isinstance(data.post.embed, BskyViewRecord):
|
||||||
is_quote = True
|
is_quote = True
|
||||||
|
Loading…
Reference in New Issue
Block a user