Compare commits
No commits in common. "697f5560a48215b6ebaf28d9ca887b2c63171d65" and "a6e935e233e145609e0b2033947dd7aeb29b13b8" have entirely different histories.
697f5560a4
...
a6e935e233
@ -3,7 +3,7 @@ wechat:
|
|||||||
# 微信HOOK接口地址
|
# 微信HOOK接口地址
|
||||||
host: 10.0.0.73:19088
|
host: 10.0.0.73:19088
|
||||||
# 是否在启动的时候自动设置hook服务的回调
|
# 是否在启动的时候自动设置hook服务的回调
|
||||||
autoSetCallback: false
|
autoSetCallback: true
|
||||||
# 回调IP,如果是Docker运行,本参数必填,如果Docker修改了映射,格式为 ip:port
|
# 回调IP,如果是Docker运行,本参数必填,如果Docker修改了映射,格式为 ip:port
|
||||||
callback: 10.0.0.51
|
callback: 10.0.0.51
|
||||||
|
|
||||||
@ -16,12 +16,12 @@ mysql:
|
|||||||
db: wechat
|
db: wechat
|
||||||
|
|
||||||
task:
|
task:
|
||||||
enable: true
|
enable: false
|
||||||
syncFriends:
|
syncFriends:
|
||||||
enable: true
|
enable: true
|
||||||
cron: '*/5 * * * *' # 五分钟一次
|
cron: '0 * * * *'
|
||||||
waterGroup:
|
waterGroup:
|
||||||
enable: false
|
enable: true
|
||||||
cron: '30 9 * * *'
|
cron: '30 9 * * *'
|
||||||
# 需要发送水群排行榜的群Id
|
# 需要发送水群排行榜的群Id
|
||||||
groups:
|
groups:
|
||||||
|
@ -25,7 +25,7 @@ type GroupUser struct {
|
|||||||
Nickname string `json:"nickname"` // 昵称
|
Nickname string `json:"nickname"` // 昵称
|
||||||
Wxid string `json:"wxid"` // 微信Id
|
Wxid string `json:"wxid"` // 微信Id
|
||||||
IsMember bool `json:"isMember" gorm:"type:tinyint(1)"` // 是否群成员
|
IsMember bool `json:"isMember" gorm:"type:tinyint(1)"` // 是否群成员
|
||||||
LeaveTime *time.Time `json:"leaveTime"` // 离开时间
|
LeaveTime time.Time `json:"leaveTime"` // 离开时间
|
||||||
}
|
}
|
||||||
|
|
||||||
func (GroupUser) TableName() string {
|
func (GroupUser) TableName() string {
|
||||||
|
@ -26,13 +26,8 @@ func Parse(remoteAddr net.Addr, msg []byte) {
|
|||||||
groupUser := ""
|
groupUser := ""
|
||||||
msgStr := m.Content
|
msgStr := m.Content
|
||||||
if strings.Contains(m.FromUser, "@") {
|
if strings.Contains(m.FromUser, "@") {
|
||||||
switch m.Type {
|
// 系统消息不单独处理
|
||||||
case types.MsgTypeRecalled:
|
if m.Type != types.MsgTypeRecalled && m.Type != types.MsgTypeSys {
|
||||||
// 消息撤回
|
|
||||||
case types.MsgTypeSys:
|
|
||||||
// 系统消息
|
|
||||||
default:
|
|
||||||
// 默认消息处理
|
|
||||||
groupUser = strings.Split(m.Content, "\n")[0]
|
groupUser = strings.Split(m.Content, "\n")[0]
|
||||||
groupUser = strings.ReplaceAll(groupUser, ":", "")
|
groupUser = strings.ReplaceAll(groupUser, ":", "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user