|
@@ -190,13 +190,19 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser |
|
|
sender.Nickname = sendUser.Nickname |
|
|
sender.Nickname = sendUser.Nickname |
|
|
sender.AvatarUrl = sendUser.AvatarUrl |
|
|
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`, 进行极光推送 |
|
|
//TODO::接收者类型为`user`, 进行极光推送 |
|
|
CommAddPush(md.PushParams{ |
|
|
CommAddPush(md.PushParams{ |
|
|
MasterId: masterId, |
|
|
MasterId: masterId, |
|
|
Uid: uid, |
|
|
Uid: uid, |
|
|
PushAlia: alia, |
|
|
PushAlia: alia, |
|
|
Title: sender.Nickname, |
|
|
Title: sender.Nickname, |
|
|
Content: string(req.MessageContent), |
|
|
|
|
|
|
|
|
Content: pushContent, |
|
|
//Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\"", |
|
|
//Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\"", |
|
|
//Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\",消息类型\"[消息类型]\",备注\"[备注]\"", |
|
|
//Content: "您收到一条新消息,来自会员\"[消息发送者-会员昵称]\",发送时间\"[时间]\",消息类型\"[消息类型]\",备注\"[备注]\"", |
|
|
PushType: "zhi_ying_gim", |
|
|
PushType: "zhi_ying_gim", |
|
|