Compare commits
No commits in common. "bcdf0a45d29b844122f0eeebcca3f08d4bc0a5c6" and "205e34f67eb6d6177477ca7722b750a9eed9896d" have entirely different histories.
bcdf0a45d2
...
205e34f67e
@ -6,7 +6,6 @@ import (
|
|||||||
plugin "go-wechat/plugin"
|
plugin "go-wechat/plugin"
|
||||||
"go-wechat/plugin/plugins"
|
"go-wechat/plugin/plugins"
|
||||||
"go-wechat/service"
|
"go-wechat/service"
|
||||||
"go-wechat/types"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Plugin
|
// Plugin
|
||||||
@ -29,10 +28,6 @@ func Plugin() {
|
|||||||
flag, _ := m.IsInvitationJoinGroup()
|
flag, _ := m.IsInvitationJoinGroup()
|
||||||
return flag
|
return flag
|
||||||
}, plugins.NotifyInvitationJoinGroup)
|
}, plugins.NotifyInvitationJoinGroup)
|
||||||
// 被移除群聊通知到配置用户
|
|
||||||
dispatcher.RegisterHandler(func(m *dto.Message) bool {
|
|
||||||
return m.Type == types.MsgTypeSys
|
|
||||||
}, plugins.NotifyRemoveFromChatroom)
|
|
||||||
|
|
||||||
// 私聊指令消息
|
// 私聊指令消息
|
||||||
dispatcher.RegisterHandler(func(m *dto.Message) bool {
|
dispatcher.RegisterHandler(func(m *dto.Message) bool {
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"go-wechat/config"
|
"go-wechat/config"
|
||||||
"go-wechat/plugin"
|
"go-wechat/plugin"
|
||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NotifyInvitationJoinGroup
|
// NotifyInvitationJoinGroup
|
||||||
@ -26,18 +25,3 @@ func NotifyInvitationJoinGroup(m *plugin.MessageContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotifyRemoveFromChatroom
|
|
||||||
// @description: 被移除群聊通知到配置用户
|
|
||||||
// @param m
|
|
||||||
func NotifyRemoveFromChatroom(m *plugin.MessageContext) {
|
|
||||||
if strings.HasPrefix(m.Content, "你被\"") && strings.HasSuffix(m.Content, "\"移出群聊") {
|
|
||||||
// 如果是被移出群聊,推送到配置的用户
|
|
||||||
for _, user := range config.Conf.System.NewFriendNotify.ToUser {
|
|
||||||
if user != "" {
|
|
||||||
// 发送一条新消息
|
|
||||||
utils.SendMessage(user, "", m.Content, 0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user