parent
b7d724a5e4
commit
05d00a8174
@ -0,0 +1,26 @@
|
||||
package check
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
discoveryRegistry "Open_IM/pkg/discoveryregistry"
|
||||
"Open_IM/pkg/proto/msg"
|
||||
"context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type MsgCheck struct {
|
||||
zk discoveryRegistry.SvcDiscoveryRegistry
|
||||
}
|
||||
|
||||
func (m *MsgCheck) getConn() (*grpc.ClientConn, error) {
|
||||
return m.zk.GetConn(config.Config.RpcRegisterName.OpenImMsgName)
|
||||
}
|
||||
|
||||
func (m *MsgCheck) SendMsg(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error) {
|
||||
cc, err := m.getConn()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp, err := msg.NewMsgClient(cc).SendMsg(ctx, req)
|
||||
return resp, err
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package notification
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/proto/sdkws"
|
||||
"context"
|
||||
)
|
||||
|
||||
// send to myself
|
||||
func (c *Check) UserInfoUpdatedNotification(ctx context.Context, opUserID string, changedUserID string) {
|
||||
selfInfoUpdatedTips := sdkws.UserInfoUpdatedTips{UserID: changedUserID}
|
||||
c.friendNotification(ctx, opUserID, changedUserID, constant.UserInfoUpdatedNotification, &selfInfoUpdatedTips)
|
||||
}
|
Loading…
Reference in new issue