From a7a4efdcb23841bf2fca012102ae5b52410ceda7 Mon Sep 17 00:00:00 2001 From: zhangsz Date: Tue, 8 Jul 2025 14:46:32 +0800 Subject: [PATCH] feat: cb message eventName --- features/ue/cb_message/service.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/features/ue/cb_message/service.go b/features/ue/cb_message/service.go index 5fabae55..83657af5 100644 --- a/features/ue/cb_message/service.go +++ b/features/ue/cb_message/service.go @@ -372,18 +372,8 @@ func (s *CBMessageService) sendDeactivateRequest(msg CBMessage) error { // 提取eventName (从messageJson中获取,如果没有eventName字段,可能需要从其他地方获取) eventName, ok := messageData["eventName"].(string) - if !ok { - // 如果messageJson中没有eventName,尝试从messageIdProfile中获取 - if messageIdProfile, exists := messageData["messageIdProfile"]; exists { - if profile, ok := messageIdProfile.(map[string]interface{}); ok { - if msgId, exists := profile["messageId"]; exists { - eventName = fmt.Sprintf("message_%v", msgId) - } - } - } - if eventName == "" { - return fmt.Errorf("eventName not found in message_json") - } + if !ok || eventName == "" { + return fmt.Errorf("eventName not found in message_json") } // 构造删除请求的payload,只包含messageIdProfile和warningAreaList