修复签到bug

This commit is contained in:
liuwei
2025-04-11 12:27:35 +08:00
parent 4631297379
commit 29d35b69a5

View File

@@ -463,16 +463,10 @@ class MessageSignPlugin(MessagePluginInterface):
# 计算新的连签天数
new_streak = original_streak
# 如果有断签前记录,直接使用断签前连签天数+1
if previous_streak > 0:
# 恢复连签:断签前连签天数 + 1 (补签后相当于连续签到)
new_streak = previous_streak + 1
self.LOG.info(f"恢复连签: {previous_streak} + 1 = {new_streak}")
else:
# 如果没有断签前记录,则连签天数+1
new_streak = original_streak + 1
self.LOG.info(f"普通补签: {original_streak} + 1 = {new_streak}")
# 恢复连签:断签前连签天数 + 1 (补签后相当于连续签到)
new_streak = previous_streak + 1
self.LOG.info(f"恢复连签: {previous_streak} + 1 = {new_streak}")
# 更新签到记录
yesterday_time = yesterday.replace(hour=current_time.hour, minute=current_time.minute,
second=current_time.second)