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

Beta417 #423

Merged
merged 20 commits into from
Jun 8, 2024
4 changes: 2 additions & 2 deletions Processor/ProcessC2CMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (p *Processors) ProcessC2CMessage(data *dto.WSC2CMessageData) error {
// Convert OnebotGroupMessage to map and send
privateMsgMap := structToMap(privateMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(privateMsgMap)
go p.BroadcastMessageToAll(privateMsgMap, p.Apiv2, data)
//组合FriendData
struserid := strconv.FormatInt(userid64, 10)
userdata := structs.FriendData{
Expand Down Expand Up @@ -296,7 +296,7 @@ func (p *Processors) ProcessC2CMessage(data *dto.WSC2CMessageData) error {
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

//组合FriendData
struserid := strconv.FormatInt(userid64, 10)
Expand Down
6 changes: 3 additions & 3 deletions Processor/ProcessChannelDirectMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (p *Processors) ProcessChannelDirectMessage(data *dto.WSDirectMessageData)
// Convert OnebotGroupMessage to map and send
privateMsgMap := structToMap(privateMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(privateMsgMap)
go p.BroadcastMessageToAll(privateMsgMap, p.Apiv2, data)
} else {
if !p.Settings.GlobalChannelToGroup {
//将频道私信作为普通频道信息
Expand Down Expand Up @@ -280,7 +280,7 @@ func (p *Processors) ProcessChannelDirectMessage(data *dto.WSDirectMessageData)
// 将 onebotMsg 结构体转换为 map[string]interface{}
msgMap := structToMap(onebotMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)
} else {
//将频道信息转化为群信息(特殊需求情况下)
//将channelid写入bolt,可取出guild_id
Expand Down Expand Up @@ -444,7 +444,7 @@ func (p *Processors) ProcessChannelDirectMessage(data *dto.WSDirectMessageData)
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)
}

}
Expand Down
4 changes: 2 additions & 2 deletions Processor/ProcessGroupAddBot.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ func (p *Processors) ProcessGroupAddBot(data *dto.GroupAddBotEvent) error {
}
groupMsgMap := structToMap(Request)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

groupMsgMap = structToMap(Notice)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down
2 changes: 1 addition & 1 deletion Processor/ProcessGroupDelBot.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ func (p *Processors) ProcessGroupDelBot(data *dto.GroupAddBotEvent) error {
}
groupMsgMap := structToMap(Notice)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)
return nil
}
2 changes: 1 addition & 1 deletion Processor/ProcessGroupMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ func (p *Processors) ProcessGroupMessage(data *dto.WSGroupATMessageData) error {
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)
return nil
}
4 changes: 2 additions & 2 deletions Processor/ProcessGroupMsgReceive.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (p *Processors) ProcessGroupMsgRecive(data *dto.GroupMsgReceiveEvent) error
noticeMap := structToMap(notice)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(noticeMap)
go p.BroadcastMessageToAll(noticeMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down Expand Up @@ -205,7 +205,7 @@ func (p *Processors) ProcessGroupMsgRecive(data *dto.GroupMsgReceiveEvent) error
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down
4 changes: 2 additions & 2 deletions Processor/ProcessGroupMsgReject.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (p *Processors) ProcessGroupMsgReject(data *dto.GroupMsgRejectEvent) error
noticeMap := structToMap(notice)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(noticeMap)
go p.BroadcastMessageToAll(noticeMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down Expand Up @@ -206,7 +206,7 @@ func (p *Processors) ProcessGroupMsgReject(data *dto.GroupMsgRejectEvent) error
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down
4 changes: 2 additions & 2 deletions Processor/ProcessGuildATMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (p *Processors) ProcessGuildATMessage(data *dto.WSATMessageData) error {
msgMap := structToMap(onebotMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)
} else {
// GlobalChannelToGroup为true时的处理逻辑
//将频道转化为一个群
Expand Down Expand Up @@ -298,7 +298,7 @@ func (p *Processors) ProcessGuildATMessage(data *dto.WSATMessageData) error {
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

}

Expand Down
4 changes: 2 additions & 2 deletions Processor/ProcessGuildNormalMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (p *Processors) ProcessGuildNormalMessage(data *dto.WSMessageData) error {
msgMap := structToMap(onebotMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)
} else {
// GlobalChannelToGroup为true时的处理逻辑
//将频道转化为一个群
Expand Down Expand Up @@ -305,7 +305,7 @@ func (p *Processors) ProcessGuildNormalMessage(data *dto.WSMessageData) error {
groupMsgMap := structToMap(groupMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)
}

return nil
Expand Down
8 changes: 4 additions & 4 deletions Processor/ProcessInlineSearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (p *Processors) ProcessInlineSearch(data *dto.WSInteractionData) error {
noticeMap := structToMap(notice)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(noticeMap)
go p.BroadcastMessageToAll(noticeMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down Expand Up @@ -221,7 +221,7 @@ func (p *Processors) ProcessInlineSearch(data *dto.WSInteractionData) error {
// Convert OnebotGroupMessage to map and send
groupMsgMap := structToMap(groupMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down Expand Up @@ -300,7 +300,7 @@ func (p *Processors) ProcessInlineSearch(data *dto.WSInteractionData) error {
// Convert OnebotGroupMessage to map and send
privateMsgMap := structToMap(privateMsg)
//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(privateMsgMap)
go p.BroadcastMessageToAll(privateMsgMap, p.Apiv2, data)

// 转换appid
AppIDString := strconv.FormatUint(p.Settings.AppID, 10)
Expand Down Expand Up @@ -361,7 +361,7 @@ func (p *Processors) ProcessInlineSearch(data *dto.WSInteractionData) error {
msgMap := structToMap(onebotMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)

// TODO: 实现eventid
}
Expand Down
6 changes: 3 additions & 3 deletions Processor/ProcessThreadMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (p *Processors) ProcessThreadMessage(data *dto.WSThreadData) error {
msgMap := structToMap(onebotMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)

return nil
} else {
Expand Down Expand Up @@ -256,7 +256,7 @@ func (p *Processors) ProcessThreadMessage(data *dto.WSThreadData) error {
msgMap := structToMap(onebotMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(msgMap)
go p.BroadcastMessageToAll(msgMap, p.Apiv2, data)
} else {
//转化为群信息
//将频道转化为一个群
Expand Down Expand Up @@ -394,7 +394,7 @@ func (p *Processors) ProcessThreadMessage(data *dto.WSThreadData) error {
groupMsgMap := structToMap(groupMsg)

//上报信息到onebotv11应用端(正反ws)
p.BroadcastMessageToAll(groupMsgMap)
go p.BroadcastMessageToAll(groupMsgMap, p.Apiv2, data)

}
}
Expand Down
Loading
Loading