DengBiao 1 anno fa
parent
commit
21cc4826b5
1 ha cambiato i file con 27 aggiunte e 1 eliminazioni
  1. +27
    -1
      internal/logic/domain/message/service/message_service.go

+ 27
- 1
internal/logic/domain/message/service/message_service.go Vedi File

@@ -192,10 +192,36 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser
}
var pushContent string
if req.MessageType != pb.MessageType_MT_TEXT {
pushContent = "您收到一条" + req.MessageType.String() + "消息"
switch req.MessageType {
case pb.MessageType_MT_UNKNOWN:
pushContent = "您收到一条\"未知\"消息"
break
case pb.MessageType_MT_FACE:
pushContent = "您收到一条表情消息"
break
case pb.MessageType_MT_VOICE:
pushContent = "您收到一条语音消息"
break
case pb.MessageType_MT_IMAGE:
pushContent = "您收到一条图片消息"
break
case pb.MessageType_MT_FILE:
pushContent = "您收到一条视频消息"
break
case pb.MessageType_MT_LOCATION:
pushContent = "您收到一条地理位置消息"
break
case pb.MessageType_MT_COMMAND:
pushContent = "您收到一条指令推送消息"
break
case pb.MessageType_MT_CUSTOM:
pushContent = "您收到一条\"自定义\"推送消息"
break
}
} else {
pushContent = string(req.MessageContent)
}

//TODO::接收者类型为`user`, 进行极光推送
CommAddPush(md.PushParams{
MasterId: masterId,


Caricamento…
Annulla
Salva