Skip to content

Commit

Permalink
refactor: directory structure of SDK change and remove redundant code. (
Browse files Browse the repository at this point in the history
#703)

* fix: remove the conversation trigger to prevent waiting in a circular queue.

Signed-off-by: Gordon <[email protected]>

* refactor: remove files to pkg.

Signed-off-by: Gordon <[email protected]>

* optimizing the code

* refactor: restruct friend module to relation.

* refactor: conversation structure and code change.

Signed-off-by: Gordon <[email protected]>

* optimizing the code

* optimizing the code

* optimizing the code

* new call

* feat: new api call

* db success log

* new api invoke

* fix: Bug fix for clearing unread messages.

Signed-off-by: Gordon <[email protected]>

* refactor: user package

* refactor: full package

* refactor: del license

* test: fix statistics

* refactor: user package

* remove unused code

* remove unused code

* feat: api format

* feat: api format

* refactor: merge opensource code main into local branch.

Signed-off-by: Gordon <[email protected]>

* refactor: merge opensource code main into local branch.

Signed-off-by: Gordon <[email protected]>

* refactor: merge opensource code main into local branch.

Signed-off-by: Gordon <[email protected]>

* feat: api format

* refactor: user

* refactor: full module remove.

Signed-off-by: Gordon <[email protected]>

* feat: update setGroupInfo API to correct.

* refactor: rename api function and add ExtractField function comment

* refactor: update logging initialization to use constant from protocol package

- Renamed the `log.InitLoggerFromConfig` function call in `init_login.go` to use the `pbConstant.PlatformID2Name` constant from the `protocol` package instead of the `constant.PlatformID2Name` constant from the `openim-sdk-core` package. This ensures consistency and avoids potential conflicts.

feat: improve error handling in HTTP client

- Updated the `get` and `postLogic` functions in `http_client.go` to use the `io.ReadAll` function instead of `ioutil.ReadAll` for reading the response body. This change improves error handling and ensures proper resource cleanup.

refactor: remove unused import in new_http.go

- Removed the unused import of `github.com/openimsdk/tools/errs` in `new_http.go` to clean up the code and improve maintainability.

* refactor: full

* refactor: update logging initialization to use constant from protocol package

* feat: format code

* Refactor: Update function name in conversation_msg package

Rename the function `revokeMessageFromSvr` to `revokeMessageFromServer` in the `revoke.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in group package

Rename the function `getGroupsInfoFromSvr` to `getGroupsInfoFromServer` in the `group.go` file of the `group` package. This change aligns with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `getConversationsByIDsFromSvr` to `getConversationsByIDsFromServer` in the `sync.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in group package

Rename the function `getGroupsInfoFromSvr` to `getGroupsInfoFromServer` in the `api.go` file of the `group` package. This change aligns with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `clearConversationFromLocalAndSvr` to `clearConversationFromLocalAndServer` in the `delete.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `deleteAllMsgFromLocalAndSvr` to `deleteAllMsgFromLocalAndServer` in the `delete.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `deleteMessagesFromSvr` to `deleteMessagesFromServer` in the `delete.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `getIncrementalConversationFromSvr` to `getIncrementalConversationFromServer` in the `incremental_sync.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `getAllConversationListFromSvr` to `getAllConversationListFromServer` in the `incremental_sync.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `getAllConversationIDsFromSvr` to `getAllConversationIDsFromServer` in the `incremental_sync.go` file of the `conversation_msg` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `syncMsgFromSvr` to `syncMsgFromServer` in the `msg_sync.go` file of the `interaction` package. This change ensures consistency with the naming convention used in the codebase.

Refactor: Update function name in conversation_msg package

Rename the function `syncMsgFromSvrSplit` to `syncMsgFromServerSplit` in the `msg_sync.go` file of the `interaction` package. This change ensures consistency with the naming convention used in the codebase.

* Refactor function names in conversation_msg package

* Refactor import paths in conversation_msg and indexdb packages

* refactor: user

* Refactor variable names and comments for clarity

* refactor: full module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: full module remove.

Signed-off-by: Gordon <[email protected]>

* Refactor import statements in api.go

* feat: format code

* feat: format code

* feat: format code

* Refactor database initialization and remove unused modules

* remove unused import pkg.

* feat: format code

* Refactor conversation_msg package and remove unused imports

* refactor: full module remove.

Signed-off-by: Gordon <[email protected]>

* Refactor file imports in conversation_msg package

* Refactor file imports in conversation_msg package

* Refactor file imports in event_listener package

* Refactor file imports in conversation_msg package

* refactor: cache

* refactor: cache

* refactor: cache

* feat: add UpdateFriends interface in wasm.

* move test to db folder.

* replece olderst const.

* refactor: del SetGlobalRecvMessageOpt

* refactor: move user

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* remove main test.

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: http module remove.

Signed-off-by: Gordon <[email protected]>

* refactor: remove chinese

* refactor: remove chinese

* Refactor group API to use simplified SetGroupInfo method

* refactor: constant add.

Signed-off-by: Gordon <[email protected]>

* refactor: constant add.

Signed-off-by: Gordon <[email protected]>

* refactor: fix msgtest route

---------

Signed-off-by: Gordon <[email protected]>
Co-authored-by: Monet Lee <[email protected]>
Co-authored-by: withchao <[email protected]>
Co-authored-by: icey-yu <[email protected]>
Co-authored-by: icey-yu <[email protected]>
  • Loading branch information
5 people authored Sep 14, 2024
1 parent 536d766 commit c8dac40
Show file tree
Hide file tree
Showing 217 changed files with 3,119 additions and 13,557 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
run: |
go mod tidy
go generate ./...
go build -o ./cmd ./cmd/main.go
cd wasm/cmd && make wasm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reopen-issue.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Reopen and Update Stale Issues

on:
workflow_dispatch: # 手动触发
workflow_dispatch: # manually trigger

jobs:
reopen_stale_issues:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ report_sizes: true

builds:
- id: openIM.wasm
main: wasm/cmd/main.go # 指定 wasm 主文件路径
main: wasm/cmd/main.go # Specify the path to the main WASM file
binary: openIM.wasm
ldflags: "-s -w"
goos:
Expand Down
234 changes: 0 additions & 234 deletions cmd/gordon_main.go

This file was deleted.

61 changes: 0 additions & 61 deletions cmd/main.go

This file was deleted.

25 changes: 0 additions & 25 deletions cmd/online_open_im.go

This file was deleted.

Loading

0 comments on commit c8dac40

Please sign in to comment.