This commit is contained in:
1-6
2023-08-09 10:21:56 +08:00
parent 2cbcfa1a5e
commit 70bad0cc52
11 changed files with 725 additions and 129 deletions
+9
View File
@@ -14,6 +14,15 @@ import (
var senderRegisters sync.Map
func getRegisterSenderByCtx(ctx context.Context, uuid string) (common.Sender, error) {
// if uuid == "" { //临时---====+++测试
// plt, _ := GetAdapter("terminal", "default")
// return plt.Sender2(map[string]string{
// CONETNT: "hello",
// USER_ID: "user_id",
// CHAT_ID: "chat_id",
// MESSAGE_ID: "MESSAGE_ID",
// }), nil
// }
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return nil, fmt.Errorf("missing metadata")