提交 8b4da904 编写于 作者: W wenxu12345

pb

上级 2ace9645
......@@ -203,9 +203,20 @@ type WSToMsgSvrChatMsg struct {
OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"`
}
func CreateGroupNotification(SendID, RecvID string, tip open_im_sdk.CreateGroupTip) {
var msg WSToMsgSvrChatMsg
msg.OperationID = utils.OperationIDGenerator()
msg.SendID = SendID
msg.RecvID = RecvID
msg.ContentType = constant.CreateGroupTip
msg.SessionType = constant.SysMsgType
}
func Notification(m *WSToMsgSvrChatMsg, onlineUserOnly bool, offlineInfo open_im_sdk.OfflinePushInfo) {
}
func (rpc *rpcChat) sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string) error {
pid, offset, err := rpc.producer.SendMessage(m, key)
if err != nil {
......
此差异已折叠。
......@@ -93,3 +93,36 @@ message OfflinePushInfo{
string Ext = 3;
}
message GroupInfoTip{
string GroupID = 1;
string GroupName = 2;
string Notification = 3;
string Introduction = 4;
string FaceUrl = 5;
string Ex = 6;
string OwnerID = 7;
uint64 CreateTime = 8;
uint32 MemberCount = 9;
}
type GroupMemberFullInfoTip struct {
string GroupId = 1 ;
string UserId = 2 ;
int Role = 3;
uint64 JoinTime = 4;
string NickName = 5;
string FaceUrl =6;
}
message CreateGroupTip{
GroupInfoTip group = 1;
UserInfoTip creator = 2;
repeated GroupMemberFullInfoTip memberList = 3;
}
......@@ -3,6 +3,7 @@ package utils
import (
"fmt"
"reflect"
"strconv"
)
// copy a by b b->a
......@@ -44,12 +45,6 @@ func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error
return nil
}
type S1 struct {
Name string
Age int
}
type S2 struct {
Name string
Age int32
func OperationIDGenerator() string {
return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册