diff --git a/internal/logic/domain/message/service/message_service.go b/internal/logic/domain/message/service/message_service.go index 70ec00f..facd094 100644 --- a/internal/logic/domain/message/service/message_service.go +++ b/internal/logic/domain/message/service/message_service.go @@ -190,13 +190,19 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser sender.Nickname = sendUser.Nickname sender.AvatarUrl = sendUser.AvatarUrl } + var pushContent string + if req.MessageType != pb.MessageType_MT_TEXT { + pushContent = "您收到一条" + req.MessageType.String() + "消息" + } else { + pushContent = string(req.MessageContent) + } //TODO::接收者类型为`user`, 进行极光推送 CommAddPush(md.PushParams{ MasterId: masterId, Uid: uid, PushAlia: alia, Title: sender.Nickname, - Content: string(req.MessageContent), + Content: pushContent, //Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\"", //Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\",消息类型\"[消息类型]\",备注\"[备注]\"", PushType: "zhi_ying_gim",