This commit is contained in:
1-6
2023-07-26 10:10:22 +08:00
parent 88cd60dfcd
commit 58c898aff2
9 changed files with 178 additions and 81 deletions
+2 -1
View File
@@ -83,8 +83,9 @@ func (sg *SillyGirlService) AdapterReceive(ctx context.Context, req *srpc.Adapte
msgs := map[string]interface{}{}
bot_id := req.GetBotId()
platform := req.GetPlatform()
// fmt.Println("a ...any", bot_id, "=", platform, string(utils.JsonMarshal(msgs)))
json.Unmarshal([]byte(req.Value), &msgs)
adapter, err := GetAdapter(bot_id, platform)
adapter, err := GetAdapter(platform, bot_id)
if err == nil {
s := adapter.Receive(msgs)
return &srpc.Default{Value: s.SetID()}, nil