🐛 修复加群通知不提醒的BUG

This commit is contained in:
李寻欢
2024-07-08 10:57:52 +08:00
parent f747bf5ead
commit 2e5632c203
5 changed files with 33 additions and 25 deletions

View File

@@ -0,0 +1,24 @@
package plugins
import (
"fmt"
"go-wechat/config"
"go-wechat/plugin"
"go-wechat/utils"
)
// NotifyInvitationJoinGroup
// @description: 通知邀请入群消息到配置用户
// @param m
func NotifyInvitationJoinGroup(m *plugin.MessageContext) {
// 如果是邀请进群,推送到配置的用户
if flag, dec := m.IsInvitationJoinGroup(); flag {
for _, user := range config.Conf.System.NewFriendNotify.ToUser {
if user != "" {
// 发送一条新消息
dec = fmt.Sprintf("#邀请入群提醒\n\n%s", dec)
utils.SendMessage(user, "", dec, 0)
}
}
}
}