mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 18:45:58 +08:00
all back-office api (#533)
* fix conflict Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> * all Back-office management api Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> --------- Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> Co-authored-by: ‘hanzhixiao’ <‘709674996@qq.com’>
This commit is contained in:
@@ -3,6 +3,7 @@ package rpcclient
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
@@ -283,3 +284,16 @@ func (s *NotificationSender) Notification(
|
||||
) error {
|
||||
return s.NotificationWithSesstionType(ctx, sendID, recvID, contentType, s.sessionTypeConf[contentType], m, opts...)
|
||||
}
|
||||
|
||||
func (m *Message) GetAllUserID(ctx context.Context, req *user.GetAllUserIDReq) (*user.GetAllUserIDResp, error) {
|
||||
conn, err := m.discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImMsgName)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
client := user.NewUserClient(conn)
|
||||
resp, err := client.GetAllUserID(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user