Skip to content

Commit

Permalink
Refactor: Remove unused GetUsersInfoWithCache function (#707)
Browse files Browse the repository at this point in the history
* refactor: fix error handling in SendMessage function

* Refactor: Remove unused GetUsersInfoWithCache function

* remove unused markfile contents.
  • Loading branch information
mo3et authored Sep 18, 2024
1 parent ba04362 commit 2e37562
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,6 @@ ifeq ($(origin GOBIN), undefined)
GOBIN := $(GOPATH)/bin
endif

COMMANDS ?= $(filter-out %.md, $(wildcard ${ROOT_DIR}/cmd/*))
BINS ?= $(foreach cmd,${COMMANDS},$(notdir ${cmd}))

ifeq (${COMMANDS},)
$(error Could not determine COMMANDS, set ROOT_DIR or run in source dir)
endif
ifeq (${BINS},)
$(error Could not determine BINS, set ROOT_DIR or run in source dir)
endif

EXCLUDE_TESTS=github.com/openimsdk/openim-sdk-core/test

# ==============================================================================
Expand Down
4 changes: 0 additions & 4 deletions open_im_sdk/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@ func GetAllUserCommands(callback open_im_sdk_callback.Base, operationID string,
call(callback, operationID, UserForSDK.User().ProcessUserCommandGetAll, Type)
}

// GetUsersInfoWithCache gets the user's information with cache.
func GetUsersInfoWithCache(callback open_im_sdk_callback.Base, operationID string, userIDs string) {
call(callback, operationID, UserForSDK.User().GetUsersInfoWithCache, userIDs)
}
1 change: 0 additions & 1 deletion wasm/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func registerFunc() {
js.Global().Set("setSelfInfo", js.FuncOf(wrapperUser.SetSelfInfo))
//js.Global().Set("setSelfInfoEx", js.FuncOf(wrapperUser.SetSelfInfo))
js.Global().Set("getUsersInfo", js.FuncOf(wrapperUser.GetUsersInfo))
js.Global().Set("getUsersInfoWithCache", js.FuncOf(wrapperUser.GetUsersInfoWithCache))
js.Global().Set("subscribeUsersStatus", js.FuncOf(wrapperUser.SubscribeUsersStatus))
js.Global().Set("unsubscribeUsersStatus", js.FuncOf(wrapperUser.UnsubscribeUsersStatus))
js.Global().Set("getSubscribeUsersStatus", js.FuncOf(wrapperUser.GetSubscribeUsersStatus))
Expand Down
5 changes: 0 additions & 5 deletions wasm/wasm_wrapper/wasm_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ func (w *WrapperUser) GetUsersInfo(_ js.Value, args []js.Value) interface{} {
return event_listener.NewCaller(open_im_sdk.GetUsersInfo, callback, &args).AsyncCallWithCallback()
}

func (w *WrapperUser) GetUsersInfoWithCache(_ js.Value, args []js.Value) interface{} {
callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc)
return event_listener.NewCaller(open_im_sdk.GetUsersInfoWithCache, callback, &args).AsyncCallWithCallback()
}

func (w *WrapperUser) SubscribeUsersStatus(_ js.Value, args []js.Value) interface{} {
callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc)
return event_listener.NewCaller(open_im_sdk.SubscribeUsersStatus, callback, &args).AsyncCallWithCallback()
Expand Down

0 comments on commit 2e37562

Please sign in to comment.