Browse Source

update push

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

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

@@ -2,6 +2,7 @@ package service

import (
"context"
"gim/internal/business/comm/utils"
"gim/internal/logic/domain/message/model"
"gim/internal/logic/domain/message/repo"
"gim/internal/logic/proxy"
@@ -150,7 +151,9 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser
logger.Sugar.Error(err)
return 0, err
}

utils.FilePutContents("devices", utils.SerializeStr(map[string]interface{}{
"data": devices,
}))
for i := range devices {
// 消息不需要投递给发送消息的设备
if sender.DeviceId == devices[i].DeviceId {


Loading…
Cancel
Save