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

fix IsToMe #17

Merged
merged 2 commits into from Apr 7, 2021
Merged

fix IsToMe #17

merged 2 commits into from Apr 7, 2021

Conversation

kanrichan
Copy link
Contributor

修复 notice 中 sub_type 是 notify 事件的 IsToMe

bot.go Outdated
Comment on lines 176 to 184
switch e.SubType {
case "honor":
if e.TargetID == e.SelfID {
e.IsToMe = true
}
case "poke", "lucky_king":
if e.TargetID == e.SelfID {
e.IsToMe = true
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块和上面可以简化, e.IsToMe = e.TargetID == e.SelfID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经修改了

@wdvxdr1123 wdvxdr1123 merged commit 7cb1b23 into wdvxdr1123:main Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants