Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 消息转发支持来自所有人 #63

Merged
merged 4 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: 优化消息转发引用回复的正则表达式
  • Loading branch information
Cassius0924 committed Feb 22, 2024
commit a9744f660954f7e082ebbbdea5f3c2c67a34b178
2 changes: 1 addition & 1 deletion wechatter/models/wechat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def forwarded_source(self) -> Optional[Tuple[str, bool]]:
group_format = GROUP_FORWARDING_MESSAGE_FORMAT.replace("[", "\[").replace(
"]", "\]"
)
pattern = re.compile(f'{group_format % ("(.+)", "(.+)")}')
pattern = re.compile(f'{group_format % ("(.*)", "(.+)")}')
try:
# 将名字和该名字是否为群都返回,便于在回复时判断
return re.search(pattern, self.content).group(2), True
Expand Down