Skip to content

Commit

Permalink
Beta417 (#423)
Browse files Browse the repository at this point in the history
* beta399

* beta400

* beta401

* beta402

* beta403

* beta404

* beta405

* beta406

* beta407

* beta408

* beta409

* beta410

* beta411

* beta412

* beta413

* beta414

* beta415

* beta416

* beta417
  • Loading branch information
Hoshinonyaruko authored Jun 8, 2024
1 parent b42aa26 commit 8311cf9
Show file tree
Hide file tree
Showing 18 changed files with 187 additions and 90 deletions.
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

0 comments on commit 8311cf9

Please sign in to comment.