mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 02:16:16 +08:00
workMoments
This commit is contained in:
parent
e687f56c7f
commit
1443f5f997
@ -4,7 +4,6 @@ import (
|
|||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
pbOffice "Open_IM/pkg/proto/office"
|
pbOffice "Open_IM/pkg/proto/office"
|
||||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
|
||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
@ -16,14 +15,13 @@ func WorkMomentSendNotification(operationID, sendID, recvID string, notification
|
|||||||
}
|
}
|
||||||
|
|
||||||
func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message) {
|
func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message) {
|
||||||
|
//var tips open_im_sdk.TipsComm
|
||||||
marshaler := jsonpb.Marshaler{
|
marshaler := jsonpb.Marshaler{
|
||||||
OrigName: true,
|
OrigName: true,
|
||||||
EnumsAsInts: false,
|
EnumsAsInts: false,
|
||||||
EmitDefaults: false,
|
EmitDefaults: false,
|
||||||
}
|
}
|
||||||
var tips open_im_sdk.TipsComm
|
JsonDetail, _ := marshaler.MarshalToString(m)
|
||||||
var err error
|
|
||||||
tips.JsonDetail, _ = marshaler.MarshalToString(m)
|
|
||||||
n := &NotificationMsg{
|
n := &NotificationMsg{
|
||||||
SendID: sendID,
|
SendID: sendID,
|
||||||
RecvID: recvID,
|
RecvID: recvID,
|
||||||
@ -32,10 +30,7 @@ func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message)
|
|||||||
SessionType: constant.SingleChatType,
|
SessionType: constant.SingleChatType,
|
||||||
OperationID: operationID,
|
OperationID: operationID,
|
||||||
}
|
}
|
||||||
n.Content, err = proto.Marshal(m)
|
n.Content = []byte(JsonDetail)
|
||||||
if err != nil {
|
log.NewInfo(operationID, utils.GetSelfFuncName(), JsonDetail)
|
||||||
log.NewError(operationID, utils.GetSelfFuncName(), "proto marshal falied", err.Error())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
Notification(n)
|
Notification(n)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user