Browse Source

update

master
DengBiao 1 year ago
parent
commit
4f81302c3f
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      internal/logic/domain/message/service/message_service.go

+ 7
- 1
internal/logic/domain/message/service/message_service.go View File

@@ -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",


Loading…
Cancel
Save