mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
base64 userID
This commit is contained in:
parent
fdaf4380fa
commit
8a471a5455
@ -15,6 +15,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -194,6 +195,7 @@ func onboardingProcessNotification(operationID, userID, groupID, userName string
|
|||||||
}
|
}
|
||||||
|
|
||||||
func oaNotification(operationID, userID string) {
|
func oaNotification(operationID, userID string) {
|
||||||
|
var err error
|
||||||
elem := manage.OANotificationElem{
|
elem := manage.OANotificationElem{
|
||||||
NotificationName: "入职通知",
|
NotificationName: "入职通知",
|
||||||
NotificationFaceURL: "",
|
NotificationFaceURL: "",
|
||||||
@ -207,20 +209,22 @@ func oaNotification(operationID, userID string) {
|
|||||||
FileElem: manage.FileElem{},
|
FileElem: manage.FileElem{},
|
||||||
Ex: "",
|
Ex: "",
|
||||||
}
|
}
|
||||||
bytes, err := json.Marshal(elem)
|
|
||||||
if err != nil {
|
|
||||||
log.NewError(operationID, utils.GetSelfFuncName(), "elem: ", elem, err.Error())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
sysNotification := &msg.NotificationMsg{
|
sysNotification := &msg.NotificationMsg{
|
||||||
SendID: config.Config.Manager.AppManagerUid[0],
|
SendID: config.Config.Manager.AppManagerUid[0],
|
||||||
RecvID: userID,
|
RecvID: userID,
|
||||||
Content: bytes,
|
|
||||||
MsgFrom: constant.SysMsgType,
|
MsgFrom: constant.SysMsgType,
|
||||||
ContentType: constant.OANotification,
|
ContentType: constant.OANotification,
|
||||||
SessionType: constant.NotificationChatType,
|
SessionType: constant.NotificationChatType,
|
||||||
OperationID: operationID,
|
OperationID: operationID,
|
||||||
}
|
}
|
||||||
|
var tips commonPb.TipsComm
|
||||||
|
tips.JsonDetail = utils.StructToJsonString(elem)
|
||||||
|
sysNotification.Content, err = proto.Marshal(&tips)
|
||||||
|
if err != nil {
|
||||||
|
log.NewError(operationID, utils.GetSelfFuncName(), "elem: ", elem, err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
msg.Notification(sysNotification)
|
msg.Notification(sysNotification)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user