From b89e3bb475a6c76fb64dfb18ebb5d32e3211034c Mon Sep 17 00:00:00 2001 From: mo3et Date: Wed, 5 Nov 2025 12:29:22 +0800 Subject: [PATCH] chore: remove unused comments. --- internal/conversation_msg/conversation.go | 24 --- internal/conversation_msg/conversion.go | 14 -- internal/conversation_msg/delete.go | 14 -- internal/conversation_msg/incremental_sync.go | 14 -- internal/conversation_msg/max_seq_recorder.go | 14 -- internal/conversation_msg/notification.go | 14 -- internal/conversation_msg/progress.go | 14 -- internal/conversation_msg/read_drawing.go | 14 -- internal/conversation_msg/revoke.go | 14 -- internal/conversation_msg/sync.go | 14 -- internal/group/api.go | 14 -- internal/group/conversion.go | 14 -- internal/group/full_sync.go | 14 -- internal/group/group.go | 14 -- internal/group/notification.go | 14 -- internal/interaction/compressor.go | 17 +- internal/interaction/constant.go | 14 -- internal/interaction/context.go | 14 -- internal/interaction/encoder.go | 15 +- internal/interaction/long_conn_mgr.go | 26 --- internal/interaction/long_connection.go | 14 -- internal/interaction/msg_sync.go | 14 -- internal/interaction/ws_default.go | 14 -- internal/interaction/ws_js.go | 14 -- internal/interaction/ws_resp_asyn.go | 33 ---- internal/third/file/bitmap.go | 14 -- internal/third/file/cb.go | 14 -- internal/third/file/file.go | 14 -- internal/third/file/file_default.go | 14 -- internal/third/file/file_js.go | 14 -- internal/third/file/file_test.go | 5 - internal/third/file/md5.go | 14 -- internal/third/file/progress.go | 14 -- internal/third/file/upload.go | 14 -- internal/third/third.go | 14 -- internal/user/user.go | 14 -- msgtest/module/pressure.go | 35 ---- open_im_sdk/caller.go | 21 --- open_im_sdk/conversation_msg.go | 14 -- open_im_sdk/em.go | 14 -- open_im_sdk/group.go | 14 -- open_im_sdk/init_login.go | 14 -- open_im_sdk/listener.go | 14 -- open_im_sdk/relation.go | 14 -- open_im_sdk/third.go | 14 -- open_im_sdk/user.go | 14 -- open_im_sdk/userRelated.go | 14 -- open_im_sdk_callback/callback_client.go | 14 -- open_im_sdk_callback/callback_go_sdk.go | 15 +- pkg/ccontext/context.go | 14 -- pkg/ccontext/context_test.go | 14 -- pkg/common/trigger_channel.go | 14 -- pkg/constant/constant.go | 14 -- pkg/db/admin_group_request_model.go | 14 -- pkg/db/app_version.go | 14 -- pkg/db/black_model.go | 14 -- pkg/db/chat_log_model.go | 14 -- pkg/db/conversation_model.go | 14 -- pkg/db/conversation_unread_message_model.go | 14 -- pkg/db/db_init.go | 14 -- pkg/db/db_interface/databse.go | 14 -- pkg/db/db_js.go | 14 -- pkg/db/friend_model.go | 14 -- pkg/db/friend_model_test.go | 15 -- pkg/db/group_member_model.go | 14 -- pkg/db/group_model.go | 14 -- pkg/db/model_struct/data_model_struct.go | 14 -- pkg/db/notification_model.go | 14 -- pkg/db/sending_messages_model.go | 14 -- pkg/db/seq_data_model.go | 14 -- pkg/db/upload_model.go | 14 -- pkg/db/user_model.go | 14 -- pkg/db/version_sync.go | 14 -- pkg/network/http_client.go | 14 -- pkg/network/new_http.go | 14 -- .../conversation_msg_sdk_struct.go | 14 -- pkg/sdk_params_callback/friend_sdk_struct.go | 14 -- pkg/sdk_params_callback/group_sdk_struct.go | 14 -- pkg/sdkerrs/code.go | 14 -- pkg/sdkerrs/error.go | 14 -- pkg/sdkerrs/predefine.go | 14 -- .../conversation_api_struct.go | 14 -- pkg/server_api_params/friend_api_struct.go | 14 -- pkg/syncer/state.go | 14 -- pkg/syncer/syncer.go | 21 --- pkg/utils/file.go | 14 -- pkg/utils/utils.go | 14 -- sdk_struct/sdk_struct.go | 14 -- test/callback.go | 14 -- test/config.go | 14 -- test/conversation_test.go | 33 ---- test/create_msg_test.go | 14 -- test/empty_test.go | 14 -- test/file_test.go | 14 -- test/friend_test.go | 163 ------------------ test/group_test.go | 14 -- test/init.go | 14 -- test/listener.go | 14 -- test/user_test.go | 14 -- wasm/cmd/main.go | 14 -- wasm/event_listener/callback_writer.go | 14 -- wasm/event_listener/caller.go | 14 -- wasm/event_listener/listener.go | 14 -- wasm/exec/executor.go | 14 -- wasm/indexdb/black_model.go | 15 +- wasm/indexdb/chat_log_model.go | 14 -- wasm/indexdb/conversation_model.go | 51 ------ .../conversation_unread_message_model.go | 18 +- wasm/indexdb/friend_model.go | 14 -- wasm/indexdb/group_member_model.go | 14 -- wasm/indexdb/group_model.go | 14 -- wasm/indexdb/init.go | 14 -- wasm/indexdb/notification_model.go | 14 -- wasm/indexdb/sending_messages_model.go | 15 +- wasm/indexdb/temp_struct/struct.go | 14 -- wasm/indexdb/upload_model.go | 15 +- wasm/indexdb/user_model.go | 20 +-- wasm/wasm_wrapper/wasm_conversation_msg.go | 36 ---- wasm/wasm_wrapper/wasm_friend.go | 14 -- wasm/wasm_wrapper/wasm_group.go | 14 -- wasm/wasm_wrapper/wasm_init_login.go | 14 -- wasm/wasm_wrapper/wasm_signaling.go | 54 ------ wasm/wasm_wrapper/wasm_third.go | 17 +- wasm/wasm_wrapper/wasm_user.go | 14 -- 124 files changed, 12 insertions(+), 2080 deletions(-) diff --git a/internal/conversation_msg/conversation.go b/internal/conversation_msg/conversation.go index db3433b2e..6ab100e3c 100644 --- a/internal/conversation_msg/conversation.go +++ b/internal/conversation_msg/conversation.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( @@ -407,16 +393,6 @@ func (c *Conversation) searchLocalMessages(ctx context.Context, searchParam *sdk if err != nil { return nil, err } - - // Logging and processing each message in the search results - //localChatLogToMsgStruct(&messageList, list) - - //log.Debug("hahh",utils.KMP("SSSsdf3434","s")) - //log.Debug("hahh",utils.KMP("SSSsdf3434","g")) - //log.Debug("hahh",utils.KMP("SSSsdf3434","3434")) - //log.Debug("hahh",utils.KMP("SSSsdf3434","F3434")) - //log.Debug("hahh",utils.KMP("SSSsdf3434","SDF3")) - // log.Debug("", "get raw data length is", len(list)) log.ZDebug(ctx, "get raw data length is", "len", len(list)) for _, v := range list { diff --git a/internal/conversation_msg/conversion.go b/internal/conversation_msg/conversion.go index dfebad586..de138b047 100644 --- a/internal/conversation_msg/conversion.go +++ b/internal/conversation_msg/conversion.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/delete.go b/internal/conversation_msg/delete.go index 72c98a3d4..e3ee1382b 100644 --- a/internal/conversation_msg/delete.go +++ b/internal/conversation_msg/delete.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/incremental_sync.go b/internal/conversation_msg/incremental_sync.go index f5520db6e..697df16eb 100644 --- a/internal/conversation_msg/incremental_sync.go +++ b/internal/conversation_msg/incremental_sync.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/max_seq_recorder.go b/internal/conversation_msg/max_seq_recorder.go index 97d79127e..52e459737 100644 --- a/internal/conversation_msg/max_seq_recorder.go +++ b/internal/conversation_msg/max_seq_recorder.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import "sync" diff --git a/internal/conversation_msg/notification.go b/internal/conversation_msg/notification.go index 1df33a537..a1639f14a 100644 --- a/internal/conversation_msg/notification.go +++ b/internal/conversation_msg/notification.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/progress.go b/internal/conversation_msg/progress.go index 430635324..c6adbec74 100644 --- a/internal/conversation_msg/progress.go +++ b/internal/conversation_msg/progress.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/read_drawing.go b/internal/conversation_msg/read_drawing.go index ad97fd57d..57f7fb05d 100644 --- a/internal/conversation_msg/read_drawing.go +++ b/internal/conversation_msg/read_drawing.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/revoke.go b/internal/conversation_msg/revoke.go index 5a3bbfd0e..5f25326d8 100644 --- a/internal/conversation_msg/revoke.go +++ b/internal/conversation_msg/revoke.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/conversation_msg/sync.go b/internal/conversation_msg/sync.go index 6da09a55c..4f12efe2c 100644 --- a/internal/conversation_msg/sync.go +++ b/internal/conversation_msg/sync.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package conversation_msg import ( diff --git a/internal/group/api.go b/internal/group/api.go index 00247c8b4..c634782f0 100644 --- a/internal/group/api.go +++ b/internal/group/api.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package group import ( diff --git a/internal/group/conversion.go b/internal/group/conversion.go index 6f6e11837..da3f71310 100644 --- a/internal/group/conversion.go +++ b/internal/group/conversion.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package group import ( diff --git a/internal/group/full_sync.go b/internal/group/full_sync.go index db5d16bc4..40d43d295 100644 --- a/internal/group/full_sync.go +++ b/internal/group/full_sync.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package group import ( diff --git a/internal/group/group.go b/internal/group/group.go index 17cb21373..b4d4c8282 100644 --- a/internal/group/group.go +++ b/internal/group/group.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package group import ( diff --git a/internal/group/notification.go b/internal/group/notification.go index d9931dd9e..bfd12b25b 100644 --- a/internal/group/notification.go +++ b/internal/group/notification.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package group import ( diff --git a/internal/interaction/compressor.go b/internal/interaction/compressor.go index a1265a2d8..c45a03bd6 100644 --- a/internal/interaction/compressor.go +++ b/internal/interaction/compressor.go @@ -1,26 +1,13 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( "bytes" "compress/gzip" "errors" - "github.com/openimsdk/tools/errs" "io" "sync" + + "github.com/openimsdk/tools/errs" ) var ( diff --git a/internal/interaction/constant.go b/internal/interaction/constant.go index a92ac5ccf..8cebfc3be 100644 --- a/internal/interaction/constant.go +++ b/internal/interaction/constant.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction const ( diff --git a/internal/interaction/context.go b/internal/interaction/context.go index 9845010c1..507d47fbd 100644 --- a/internal/interaction/context.go +++ b/internal/interaction/context.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( diff --git a/internal/interaction/encoder.go b/internal/interaction/encoder.go index 6ed8e0080..08a394013 100644 --- a/internal/interaction/encoder.go +++ b/internal/interaction/encoder.go @@ -1,22 +1,9 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( "bytes" "encoding/gob" + "github.com/openimsdk/tools/errs" ) diff --git a/internal/interaction/long_conn_mgr.go b/internal/interaction/long_conn_mgr.go index 68a06ebaa..e7485efd1 100644 --- a/internal/interaction/long_conn_mgr.go +++ b/internal/interaction/long_conn_mgr.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( @@ -613,18 +599,6 @@ func (c *LongConnMgr) callbackUserOnlineChange(users map[string][]int32) { return } c.userOnline(users) - //for userID, onlinePlatformIDs := range users { - // status := userPb.OnlineStatus{ - // UserID: userID, - // PlatformIDs: onlinePlatformIDs, - // } - // if len(status.PlatformIDs) == 0 { - // status.Status = constant.Offline - // } else { - // status.Status = constant.Online - // } - // c.userOnline.OnUserStatusChanged(utils.StructToJsonString(users)) - //} } func (c *LongConnMgr) IsConnected() bool { diff --git a/internal/interaction/long_connection.go b/internal/interaction/long_connection.go index 73d794247..aea04e3bd 100644 --- a/internal/interaction/long_connection.go +++ b/internal/interaction/long_connection.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( diff --git a/internal/interaction/msg_sync.go b/internal/interaction/msg_sync.go index 8599e4b82..f2248f9e3 100644 --- a/internal/interaction/msg_sync.go +++ b/internal/interaction/msg_sync.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( diff --git a/internal/interaction/ws_default.go b/internal/interaction/ws_default.go index 4192eb10e..8690d9586 100644 --- a/internal/interaction/ws_default.go +++ b/internal/interaction/ws_default.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js package interaction diff --git a/internal/interaction/ws_js.go b/internal/interaction/ws_js.go index f37031cd3..d7bf55cfd 100644 --- a/internal/interaction/ws_js.go +++ b/internal/interaction/ws_js.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/internal/interaction/ws_resp_asyn.go b/internal/interaction/ws_resp_asyn.go index 57da8446c..4fbf6f038 100644 --- a/internal/interaction/ws_resp_asyn.go +++ b/internal/interaction/ws_resp_asyn.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package interaction import ( @@ -139,33 +125,14 @@ func (u *WsRespAsyn) WaitResp(ctx context.Context, ch chan *GeneralWsResp, timeo select { case r, ok := <-ch: if !ok { //ch has been closed - //log.Debug(operationID, "ws network has been changed ") return nil, nil } - //log.Debug(operationID, "ws ch recvMsg success, code ", r.ErrCode) if r.ErrCode != 0 { - //log.Error(operationID, "ws ch recvMsg failed, code, err msg: ", r.ErrCode, r.ErrMsg) - //switch r.ErrCode { - //case int(constant.ErrInBlackList.ErrCode): - // return nil, &constant.ErrInBlackList - //case int(constant.ErrNotFriend.ErrCode): - // return nil, &constant.ErrNotFriend - //} - //return nil, errors.New(utils.IntToString(r.ErrCode) + ":" + r.ErrMsg) } else { return r, nil } case <-time.After(time.Second * time.Duration(timeout)): - //log.Error(operationID, "ws ch recvMsg err, timeout") - //if w.conn.IsNil() { - // return nil, errors.New("ws ch recvMsg err, timeout,conn is nil") - //} - //if w.conn.CheckSendConnDiffNow() { - // return nil, constant.WsRecvConnDiff - //} else { - // return nil, constant.WsRecvConnSame - //} } return nil, nil } diff --git a/internal/third/file/bitmap.go b/internal/third/file/bitmap.go index edd0ab12a..52f8820a5 100644 --- a/internal/third/file/bitmap.go +++ b/internal/third/file/bitmap.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM open source community. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file func NewBitmap(size int) *Bitmap { diff --git a/internal/third/file/cb.go b/internal/third/file/cb.go index 6c17f0adf..208515f7d 100644 --- a/internal/third/file/cb.go +++ b/internal/third/file/cb.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file import "fmt" diff --git a/internal/third/file/file.go b/internal/third/file/file.go index ea8121382..facd0f7ad 100644 --- a/internal/third/file/file.go +++ b/internal/third/file/file.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM open source community. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file import "io" diff --git a/internal/third/file/file_default.go b/internal/third/file/file_default.go index 0bcc25951..91790f968 100644 --- a/internal/third/file/file_default.go +++ b/internal/third/file/file_default.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM open source community. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js package file diff --git a/internal/third/file/file_js.go b/internal/third/file/file_js.go index 2f73ccd30..c200cd61f 100644 --- a/internal/third/file/file_js.go +++ b/internal/third/file/file_js.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM open source community. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/internal/third/file/file_test.go b/internal/third/file/file_test.go index 97f982926..847c9a5eb 100644 --- a/internal/third/file/file_test.go +++ b/internal/third/file/file_test.go @@ -19,11 +19,6 @@ func TestUpload(t *testing.T) { ctx := ccontext.WithInfo(context.WithValue(context.Background(), "operationID", "OP123456"), conf) f := NewFile(nil, conf.UserID) - //fp := `C:\Users\openIM\Desktop\my_image (2).tar` - //fp := `C:\Users\openIM\Desktop\1234.zip` - //fp := `C:\Users\openIM\Desktop\openIM.wasm` - //fp := `C:\Users\openIM\Desktop\ubuntu.7z` - //fp := `C:\Users\openIM\Desktop\log2023-10-31.log` fp := `C:\Users\openIM\Desktop\protoc.zip` resp, err := f.UploadFile(ctx, &UploadFileReq{ diff --git a/internal/third/file/md5.go b/internal/third/file/md5.go index 53f201bf7..85a7bd593 100644 --- a/internal/third/file/md5.go +++ b/internal/third/file/md5.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file import ( diff --git a/internal/third/file/progress.go b/internal/third/file/progress.go index 7d722dea5..21e40b052 100644 --- a/internal/third/file/progress.go +++ b/internal/third/file/progress.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file import ( diff --git a/internal/third/file/upload.go b/internal/third/file/upload.go index 63972bd97..5357b88f2 100644 --- a/internal/third/file/upload.go +++ b/internal/third/file/upload.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package file import ( diff --git a/internal/third/third.go b/internal/third/third.go index 4a34b82e2..9a5d6e699 100644 --- a/internal/third/third.go +++ b/internal/third/third.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package third import ( diff --git a/internal/user/user.go b/internal/user/user.go index ce5734d9d..2ce84432b 100644 --- a/internal/user/user.go +++ b/internal/user/user.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package user import ( diff --git a/msgtest/module/pressure.go b/msgtest/module/pressure.go index 2f547ad75..9e1a87603 100644 --- a/msgtest/module/pressure.go +++ b/msgtest/module/pressure.go @@ -348,32 +348,6 @@ func (p *PressureTester) sendMessage2Groups(senderIDs []string, groupID string, wg.Wait() } -// func (p *PressureTester) SendSingleMessages(fastenedUserIDs []string, num int, duration time.Duration) { -// var wg sync.WaitGroup -// length := len(fastenedUserIDs) -// rand.Seed(time.Now().UnixNano()) -// for i, userID := range fastenedUserIDs { -// counter:=0 -// for counter < num { -// index := rand.Intn(length) -// if index != i { -// counter++ -// wg.Add(1) -// go func(reciver string,sender string,counter int) { -// defer wg.Done() -// if user, ok := p.msgSender[sender]; ok { -// user.SendMsgWithContext(reciver, counter) -// } -// time.Sleep(duration) -// }(fastenedUserIDs[index],userID,counter) -// } -// } - -// } -// wg.Wait() - -// } - func (p *PressureTester) SendSingleMessages(ctx context.Context, fastenedUserIDs []string, randomSender []string, randomReceiver, num int, duration time.Duration) { log.ZWarn(ctx, "send single message start", nil, "randomSender", len(randomSender), "randomReceiver", randomReceiver) if len(randomSender) == 0 || randomReceiver == 0 || num == 0 { @@ -442,15 +416,6 @@ func (p *PressureTester) SendSingleMessagesTo(fastenedUserIDs []string, num int, //length := len(fastenedUserIDs) rand.Seed(time.Now().UnixNano()) for i, userID := range fastenedUserIDs { - //counter := 0 - //var receiverUserIDs []string - //for counter < num { - // index := rand.Intn(length) - // if index != i { - // counter++ - // receiverUserIDs = append(receiverUserIDs, fastenedUserIDs[index]) - // } - //} var receiverUserIDs []string for i < num { receiverUserIDs = append(receiverUserIDs, utils.IntToString(i)) diff --git a/open_im_sdk/caller.go b/open_im_sdk/caller.go index c68d03855..e03c64db0 100644 --- a/open_im_sdk/caller.go +++ b/open_im_sdk/caller.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( @@ -163,13 +149,6 @@ func call_(operationID string, fn any, args ...any) (res any, err error) { } } - //if isNumeric(arg.Kind()) && isNumeric(inFnField.Kind()) { - // v := reflect.Zero(inFnField).Interface() - // setNumeric(args[i], &v) - // ins = append(ins, reflect.ValueOf(v)) - // continue - //} - return nil, sdkerrs.ErrSdkInternal.WrapMsg("go code error: fn in args type is not match") } diff --git a/open_im_sdk/conversation_msg.go b/open_im_sdk/conversation_msg.go index 17cb8dc3c..1470423e4 100644 --- a/open_im_sdk/conversation_msg.go +++ b/open_im_sdk/conversation_msg.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/em.go b/open_im_sdk/em.go index 6e1078b51..1f3841563 100644 --- a/open_im_sdk/em.go +++ b/open_im_sdk/em.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/group.go b/open_im_sdk/group.go index 144ebb7a2..a733dac71 100644 --- a/open_im_sdk/group.go +++ b/open_im_sdk/group.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import "github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback" diff --git a/open_im_sdk/init_login.go b/open_im_sdk/init_login.go index e8692f135..26f617d39 100644 --- a/open_im_sdk/init_login.go +++ b/open_im_sdk/init_login.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/listener.go b/open_im_sdk/listener.go index fae681eec..5b50a5d0b 100644 --- a/open_im_sdk/listener.go +++ b/open_im_sdk/listener.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/relation.go b/open_im_sdk/relation.go index 9cc0b8a79..4ac0a4214 100644 --- a/open_im_sdk/relation.go +++ b/open_im_sdk/relation.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import "github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback" diff --git a/open_im_sdk/third.go b/open_im_sdk/third.go index 65c938371..15fce59c3 100644 --- a/open_im_sdk/third.go +++ b/open_im_sdk/third.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/user.go b/open_im_sdk/user.go index 1882733bd..6f6afee29 100644 --- a/open_im_sdk/user.go +++ b/open_im_sdk/user.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk/userRelated.go b/open_im_sdk/userRelated.go index 3a686dec4..82dd42bf1 100644 --- a/open_im_sdk/userRelated.go +++ b/open_im_sdk/userRelated.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk import ( diff --git a/open_im_sdk_callback/callback_client.go b/open_im_sdk_callback/callback_client.go index 11f9889b9..8c5241b28 100644 --- a/open_im_sdk_callback/callback_client.go +++ b/open_im_sdk_callback/callback_client.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk_callback type Base interface { diff --git a/open_im_sdk_callback/callback_go_sdk.go b/open_im_sdk_callback/callback_go_sdk.go index b38005e6d..afa3fd61a 100644 --- a/open_im_sdk_callback/callback_go_sdk.go +++ b/open_im_sdk_callback/callback_go_sdk.go @@ -1,21 +1,8 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package open_im_sdk_callback import ( "context" + "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" diff --git a/pkg/ccontext/context.go b/pkg/ccontext/context.go index 9d0486104..390a90e65 100644 --- a/pkg/ccontext/context.go +++ b/pkg/ccontext/context.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package ccontext import ( diff --git a/pkg/ccontext/context_test.go b/pkg/ccontext/context_test.go index 704d24eaf..89c608853 100644 --- a/pkg/ccontext/context_test.go +++ b/pkg/ccontext/context_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package ccontext import ( diff --git a/pkg/common/trigger_channel.go b/pkg/common/trigger_channel.go index 414564574..b52d0d51f 100644 --- a/pkg/common/trigger_channel.go +++ b/pkg/common/trigger_channel.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package common import ( diff --git a/pkg/constant/constant.go b/pkg/constant/constant.go index a07fe8f1e..b14b5c94d 100644 --- a/pkg/constant/constant.go +++ b/pkg/constant/constant.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package constant const ( diff --git a/pkg/db/admin_group_request_model.go b/pkg/db/admin_group_request_model.go index b58c1e749..2fdccd0cc 100644 --- a/pkg/db/admin_group_request_model.go +++ b/pkg/db/admin_group_request_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/app_version.go b/pkg/db/app_version.go index d1da18a6f..e49a24b8f 100644 --- a/pkg/db/app_version.go +++ b/pkg/db/app_version.go @@ -1,17 +1,3 @@ -// Copyright © 2024 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/black_model.go b/pkg/db/black_model.go index b4d090248..b7034f1c9 100644 --- a/pkg/db/black_model.go +++ b/pkg/db/black_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/chat_log_model.go b/pkg/db/chat_log_model.go index d5ea1fea6..987b61244 100644 --- a/pkg/db/chat_log_model.go +++ b/pkg/db/chat_log_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/conversation_model.go b/pkg/db/conversation_model.go index 391f7992f..2f1f3e497 100644 --- a/pkg/db/conversation_model.go +++ b/pkg/db/conversation_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/conversation_unread_message_model.go b/pkg/db/conversation_unread_message_model.go index e309fdde7..878adb2be 100644 --- a/pkg/db/conversation_unread_message_model.go +++ b/pkg/db/conversation_unread_message_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/db_init.go b/pkg/db/db_init.go index c515fe5b6..424be3515 100644 --- a/pkg/db/db_init.go +++ b/pkg/db/db_init.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/db_interface/databse.go b/pkg/db/db_interface/databse.go index 61384f201..19b620403 100644 --- a/pkg/db/db_interface/databse.go +++ b/pkg/db/db_interface/databse.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package db_interface import ( diff --git a/pkg/db/db_js.go b/pkg/db/db_js.go index 842e96d27..ddf085cec 100644 --- a/pkg/db/db_js.go +++ b/pkg/db/db_js.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package db import ( diff --git a/pkg/db/friend_model.go b/pkg/db/friend_model.go index 8b41fb803..6a110297e 100644 --- a/pkg/db/friend_model.go +++ b/pkg/db/friend_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/friend_model_test.go b/pkg/db/friend_model_test.go index 9e55189af..557f36d57 100644 --- a/pkg/db/friend_model_test.go +++ b/pkg/db/friend_model_test.go @@ -90,18 +90,3 @@ func Test_DeleteAllFriend(t *testing.T) { } } - -// func Test_UpdateColumnsFriend(t *testing.T) { -// ctx := context.Background() -// db, err := db.NewDataBase(ctx, "1695766238", "./", 6) -// if err != nil { -// return -// } -// // log.ZError(ctx, "DB err test", nil, "key", "vale") - -// err = db.UpdateColumnsFriend(ctx) -// if err != nil { -// t.Fatal(err) -// } - -// } diff --git a/pkg/db/group_member_model.go b/pkg/db/group_member_model.go index d9c503a63..d57800e1c 100644 --- a/pkg/db/group_member_model.go +++ b/pkg/db/group_member_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/group_model.go b/pkg/db/group_model.go index 368142b84..5811f3c47 100644 --- a/pkg/db/group_model.go +++ b/pkg/db/group_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/model_struct/data_model_struct.go b/pkg/db/model_struct/data_model_struct.go index 8c5ee887b..4ccdb240d 100644 --- a/pkg/db/model_struct/data_model_struct.go +++ b/pkg/db/model_struct/data_model_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package model_struct import ( diff --git a/pkg/db/notification_model.go b/pkg/db/notification_model.go index e84f42bf8..39d887622 100644 --- a/pkg/db/notification_model.go +++ b/pkg/db/notification_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/sending_messages_model.go b/pkg/db/sending_messages_model.go index a94a2c159..62a46c1ad 100644 --- a/pkg/db/sending_messages_model.go +++ b/pkg/db/sending_messages_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/seq_data_model.go b/pkg/db/seq_data_model.go index 7c3432d62..faf05c847 100644 --- a/pkg/db/seq_data_model.go +++ b/pkg/db/seq_data_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/upload_model.go b/pkg/db/upload_model.go index f9374325e..a83fa010c 100644 --- a/pkg/db/upload_model.go +++ b/pkg/db/upload_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/user_model.go b/pkg/db/user_model.go index 2365117e6..cc85e71c0 100644 --- a/pkg/db/user_model.go +++ b/pkg/db/user_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/db/version_sync.go b/pkg/db/version_sync.go index ce6c65bd1..1990954ca 100644 --- a/pkg/db/version_sync.go +++ b/pkg/db/version_sync.go @@ -1,17 +1,3 @@ -// Copyright © 2024 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build !js // +build !js diff --git a/pkg/network/http_client.go b/pkg/network/http_client.go index 6b13f7070..bd12e914e 100644 --- a/pkg/network/http_client.go +++ b/pkg/network/http_client.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package network import ( diff --git a/pkg/network/new_http.go b/pkg/network/new_http.go index fb02fdc8d..111e17077 100644 --- a/pkg/network/new_http.go +++ b/pkg/network/new_http.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package network import ( diff --git a/pkg/sdk_params_callback/conversation_msg_sdk_struct.go b/pkg/sdk_params_callback/conversation_msg_sdk_struct.go index 7a2aa19fd..bce658198 100644 --- a/pkg/sdk_params_callback/conversation_msg_sdk_struct.go +++ b/pkg/sdk_params_callback/conversation_msg_sdk_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdk_params_callback import ( diff --git a/pkg/sdk_params_callback/friend_sdk_struct.go b/pkg/sdk_params_callback/friend_sdk_struct.go index 07b99be36..28a5b9abc 100644 --- a/pkg/sdk_params_callback/friend_sdk_struct.go +++ b/pkg/sdk_params_callback/friend_sdk_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdk_params_callback import ( diff --git a/pkg/sdk_params_callback/group_sdk_struct.go b/pkg/sdk_params_callback/group_sdk_struct.go index abd3a82f3..d3fd6bc3a 100644 --- a/pkg/sdk_params_callback/group_sdk_struct.go +++ b/pkg/sdk_params_callback/group_sdk_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdk_params_callback type SearchGroupsParam struct { diff --git a/pkg/sdkerrs/code.go b/pkg/sdkerrs/code.go index aaa2523ef..9b9960ccb 100644 --- a/pkg/sdkerrs/code.go +++ b/pkg/sdkerrs/code.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdkerrs // Common error codes diff --git a/pkg/sdkerrs/error.go b/pkg/sdkerrs/error.go index 0470a72b9..9f574feed 100644 --- a/pkg/sdkerrs/error.go +++ b/pkg/sdkerrs/error.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdkerrs import "github.com/openimsdk/tools/errs" diff --git a/pkg/sdkerrs/predefine.go b/pkg/sdkerrs/predefine.go index 28b55f601..b313a94d1 100644 --- a/pkg/sdkerrs/predefine.go +++ b/pkg/sdkerrs/predefine.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdkerrs import "github.com/openimsdk/tools/errs" diff --git a/pkg/server_api_params/conversation_api_struct.go b/pkg/server_api_params/conversation_api_struct.go index 56c6e4759..08a7f3acf 100644 --- a/pkg/server_api_params/conversation_api_struct.go +++ b/pkg/server_api_params/conversation_api_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package server_api_params type Conversation struct { diff --git a/pkg/server_api_params/friend_api_struct.go b/pkg/server_api_params/friend_api_struct.go index 054890b56..99493e68b 100644 --- a/pkg/server_api_params/friend_api_struct.go +++ b/pkg/server_api_params/friend_api_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package server_api_params type UserIDResult struct { diff --git a/pkg/syncer/state.go b/pkg/syncer/state.go index 6db3c0ab7..b5e1cea50 100644 --- a/pkg/syncer/state.go +++ b/pkg/syncer/state.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package syncer const ( diff --git a/pkg/syncer/syncer.go b/pkg/syncer/syncer.go index 7a4e386d8..f80539ec2 100644 --- a/pkg/syncer/syncer.go +++ b/pkg/syncer/syncer.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package syncer import ( @@ -353,13 +339,6 @@ func (s *Syncer[T, RESP, V]) FullSync(ctx context.Context, entityID string) (err log.ZError(ctx, "full sync failed", err, "type", s.ts) } }() - - //// If server data is empty, log and return - //if len(serverData) == 0 { - // log.ZDebug(ctx, "full sync server data is empty", "type", s.ts) - // return nil - //} - // Clear local table data if err = s.deleteAll(ctx, entityID); err != nil { return errs.New("full sync delete all failed", "err", err.Error(), "type", s.ts) diff --git a/pkg/utils/file.go b/pkg/utils/file.go index dce2ad16e..5696e66ca 100644 --- a/pkg/utils/file.go +++ b/pkg/utils/file.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package utils import ( diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 23faa08cf..e40499bb0 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package utils import ( diff --git a/sdk_struct/sdk_struct.go b/sdk_struct/sdk_struct.go index 93ee2b38c..a366cbd80 100644 --- a/sdk_struct/sdk_struct.go +++ b/sdk_struct/sdk_struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package sdk_struct import ( diff --git a/test/callback.go b/test/callback.go index e31b60ebe..da1130db6 100644 --- a/test/callback.go +++ b/test/callback.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import "fmt" diff --git a/test/config.go b/test/config.go index efe1e306a..c4f89bafc 100644 --- a/test/config.go +++ b/test/config.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import "github.com/openimsdk/protocol/constant" diff --git a/test/conversation_test.go b/test/conversation_test.go index 8130f34aa..b0c2f619f 100644 --- a/test/conversation_test.go +++ b/test/conversation_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( @@ -56,16 +42,6 @@ func Test_HideConversation(t *testing.T) { } } -//func Test_GetConversationRecvMessageOpt(t *testing.T) { -// opts, err := open_im_sdk.IMUserContext.Conversation().GetConversationRecvMessageOpt(ctx, []string{"asdasd"}) -// if err != nil { -// t.Fatal(err) -// } -// for _, v := range opts { -// t.Log(v.ConversationID, *v.Execute) -// } -//} - func Test_GetGlobalRecvMessageOpt(t *testing.T) { opt, err := open_im_sdk.IMUserContext.Conversation().GetOneConversation(ctx, 2, "1772958501") if err != nil { @@ -239,15 +215,6 @@ func Test_DeleteConversationAndDeleteAllMsg(t *testing.T) { } } -// func Test_RevokeMessage(t *testing.T) { -// err := open_im_sdk.IMUserContext.Conversation().RevokeMessage(ctx, &sdk_struct.MsgStruct{SessionType: 1, ContentType: 101, -// ClientMsgID: "380e2eb1709875340d769880982ebb21", Seq: 57, SendID: "9169012630", RecvID: "2456093263"}) -// if err != nil { -// t.Fatal(err) -// } -// time.Sleep(time.Second * 10) -// } - func Test_MarkConversationMessageAsRead(t *testing.T) { err := open_im_sdk.IMUserContext.Conversation().MarkConversationMessageAsRead(ctx, "si_2688118337_7249315132") if err != nil { diff --git a/test/create_msg_test.go b/test/create_msg_test.go index c34c7390b..51cf0fac3 100644 --- a/test/create_msg_test.go +++ b/test/create_msg_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/empty_test.go b/test/empty_test.go index 05c2698b9..15ef27c5c 100644 --- a/test/empty_test.go +++ b/test/empty_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/file_test.go b/test/file_test.go index ec995decd..ef596e4e1 100644 --- a/test/file_test.go +++ b/test/file_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/friend_test.go b/test/friend_test.go index 3f1461f27..56e540407 100644 --- a/test/friend_test.go +++ b/test/friend_test.go @@ -1,164 +1 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test - -// -//import ( -// "github.com/openimsdk/openim-sdk-core/v3/open_im_sdk" -// "github.com/openimsdk/openim-sdk-core/v3/pkg/sdk_params_callback" -// "github.com/openimsdk/protocol/wrapperspb" -// "testing" -// "time" -// -// friend2 "github.com/openimsdk/protocol/relation" -//) -// -//func Test_GetSpecifiedFriendsInfo(t *testing.T) { -// info, err := open_im_sdk.UserForSDK.Friend().GetSpecifiedFriendsInfo(ctx, []string{"45644221123"}) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("GetDesignatedFriendsInfo success", ctx.Value("operationID")) -// for _, userInfo := range info { -// t.Log(userInfo) -// } -//} -// -//func Test_AddFriend(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().AddFriend(ctx, &friend2.ApplyToAddFriendReq{ -// ToUserID: "2", -// ReqMsg: "test add", -// Ex: "add", -// }) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("AddFriend success", ctx.Value("operationID")) -//} -// -// -//func Test_AcceptFriendApplication(t *testing.T) { -// req := &sdk_params_callback.ProcessFriendApplicationParams{ToUserID: "1", HandleMsg: "test accept"} -// err := open_im_sdk.UserForSDK.Friend().AcceptFriendApplication(ctx, req) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("AcceptFriendApplication success", ctx.Value("operationID")) -// time.Sleep(time.Second * 30) -//} -// -//func Test_RefuseFriendApplication(t *testing.T) { -// req := &sdk_params_callback.ProcessFriendApplicationParams{ToUserID: "6754269405", HandleMsg: "test refuse"} -// err := open_im_sdk.UserForSDK.Friend().RefuseFriendApplication(ctx, req) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("RefuseFriendApplication success", ctx.Value("operationID")) -// time.Sleep(time.Second * 30) -//} -// -//func Test_CheckFriend(t *testing.T) { -// res, err := open_im_sdk.UserForSDK.Friend().CheckFriend(ctx, []string{"863454357", "45644221123"}) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("CheckFriend success", ctx.Value("operationID")) -// for _, re := range res { -// t.Log(re) -// } -//} -//func Test_PinFriend(t *testing.T) { -// pinParams := &sdk_params_callback.SetFriendPinParams{ -// ToUserIDs: []string{"2", "3"}, -// IsPinned: &wrapperspb.BoolValue{Value: false}, -// } -// -// err := open_im_sdk.UserForSDK.Friend().PinFriends(ctx, pinParams) -// -// if err != nil { -// t.Fatal(err) -// } -// t.Log("CheckFriend success", ctx.Value("operationID")) -//} -//func Test_DeleteFriend(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().DeleteFriend(ctx, "863454357") -// if err != nil { -// t.Fatal(err) -// } -// t.Log("DeleteFriend success", ctx.Value("operationID")) -//} -// -//func Test_GetFriendList(t *testing.T) { -// infos, err := open_im_sdk.UserForSDK.Friend().GetFriendList(ctx) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("GetFriendList success", ctx.Value("operationID")) -// for _, info := range infos { -// t.Logf("PublicInfo: %#v, FriendInfo: %#v, BlackInfo: %#v", info.PublicInfo, info.FriendInfo, info.BlackInfo) -// } -//} -// -//func Test_SearchFriends(t *testing.T) { -// info, err := open_im_sdk.UserForSDK.Friend().SearchFriends(ctx, &sdk_params_callback.SearchFriendsParam{KeywordList: []string{"863454357"}, IsSearchUserID: true}) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("SearchFriends success", ctx.Value("operationID")) -// for _, item := range info { -// t.Log(*item) -// } -//} -// -//func Test_SetFriendRemark(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().SetFriendRemark(ctx, &sdk_params_callback.SetFriendRemarkParams{ToUserID: "863454357", Remark: "testRemark"}) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("SetFriendRemark success", ctx.Value("operationID")) -//} -// -//func Test_AddBlack(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().AddBlack(ctx, "863454357", "ex") -// if err != nil { -// t.Fatal(err) -// } -// t.Log("AddBlack success", ctx.Value("operationID")) -//} -// -//func Test_RemoveBlack(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().RemoveBlack(ctx, "863454357") -// if err != nil { -// t.Fatal(err) -// } -// t.Log("RemoveBlack success", ctx.Value("operationID")) -//} -// -//func Test_GetBlackList(t *testing.T) { -// info, err := open_im_sdk.UserForSDK.Friend().GetBlackList(ctx) -// if err != nil { -// t.Fatal(err) -// } -// t.Log("GetBlackList success", ctx.Value("operationID")) -// for _, item := range info { -// t.Log(*item) -// } -//} -//func Test_SetFriendsEx(t *testing.T) { -// err := open_im_sdk.UserForSDK.Friend().SetFriendsEx(ctx, []string{"2"}, "exx") -// if err != nil { -// t.Fatal(err) -// } -//} diff --git a/test/group_test.go b/test/group_test.go index 8be8bc4b4..a988dfcef 100644 --- a/test/group_test.go +++ b/test/group_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/init.go b/test/init.go index 6047aa9eb..cf561be9c 100644 --- a/test/init.go +++ b/test/init.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/listener.go b/test/listener.go index 343ec595f..a5d316b50 100644 --- a/test/listener.go +++ b/test/listener.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/test/user_test.go b/test/user_test.go index b226ab714..4a97330a7 100644 --- a/test/user_test.go +++ b/test/user_test.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package test import ( diff --git a/wasm/cmd/main.go b/wasm/cmd/main.go index 33ccbfdbe..f181542dc 100644 --- a/wasm/cmd/main.go +++ b/wasm/cmd/main.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/event_listener/callback_writer.go b/wasm/event_listener/callback_writer.go index 8301e175a..04e7f7fa1 100644 --- a/wasm/event_listener/callback_writer.go +++ b/wasm/event_listener/callback_writer.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/event_listener/caller.go b/wasm/event_listener/caller.go index 0f6007d2a..93bca074e 100644 --- a/wasm/event_listener/caller.go +++ b/wasm/event_listener/caller.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/event_listener/listener.go b/wasm/event_listener/listener.go index 88bf3f720..7f7aea1b6 100644 --- a/wasm/event_listener/listener.go +++ b/wasm/event_listener/listener.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/exec/executor.go b/wasm/exec/executor.go index 635d1399f..3e5452d73 100644 --- a/wasm/exec/executor.go +++ b/wasm/exec/executor.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/black_model.go b/wasm/indexdb/black_model.go index 007692d94..79045e3ce 100644 --- a/wasm/indexdb/black_model.go +++ b/wasm/indexdb/black_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -19,6 +5,7 @@ package indexdb import ( "context" + "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" diff --git a/wasm/indexdb/chat_log_model.go b/wasm/indexdb/chat_log_model.go index d594e8d48..909c20b09 100644 --- a/wasm/indexdb/chat_log_model.go +++ b/wasm/indexdb/chat_log_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/conversation_model.go b/wasm/indexdb/conversation_model.go index 3800e5f67..ba564bd96 100644 --- a/wasm/indexdb/conversation_model.go +++ b/wasm/indexdb/conversation_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -427,42 +413,5 @@ func (i *LocalConversations) SearchConversations(ctx context.Context, searchPara } func (i *LocalConversations) UpdateOrCreateConversations(ctx context.Context, conversationList []*model_struct.LocalConversation) error { - //conversationIDs, err := Exec(ctx) return nil - //if err != nil { - // return err - //} else { - // if v, ok := conversationIDs.(string); ok { - // var conversationIDs []string - // err := utils.JsonStringToStruct(v, &conversationIDs) - // if err != nil { - // return err - // } - // var notExistConversations []*model_struct.LocalConversation - // var existConversations []*model_struct.LocalConversation - // for i, v := range conversationList { - // if utils.IsContain(v.ConversationID, conversationIDs) { - // existConversations = append(existConversations, v) - // continue - // } else { - // notExistConversations = append(notExistConversations, conversationList[i]) - // } - // } - // if len(notExistConversations) > 0 { - // err := Exec(ctx, notExistConversations) - // if err != nil { - // return err - // } - // } - // for _, v := range existConversations { - // err := Exec(ctx, v) - // if err != nil { - // return err - // } - // } - // return nil - // } else { - // return ErrType - // } - //} } diff --git a/wasm/indexdb/conversation_unread_message_model.go b/wasm/indexdb/conversation_unread_message_model.go index 534946d0b..4c2e6c76b 100644 --- a/wasm/indexdb/conversation_unread_message_model.go +++ b/wasm/indexdb/conversation_unread_message_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -19,12 +5,10 @@ package indexdb import ( "context" - "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" -) -import ( "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" + "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" ) type LocalConversationUnreadMessages struct { diff --git a/wasm/indexdb/friend_model.go b/wasm/indexdb/friend_model.go index 21312ccde..89d08948d 100644 --- a/wasm/indexdb/friend_model.go +++ b/wasm/indexdb/friend_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/group_member_model.go b/wasm/indexdb/group_member_model.go index 6edfe62a9..99f4ce0a3 100644 --- a/wasm/indexdb/group_member_model.go +++ b/wasm/indexdb/group_member_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/group_model.go b/wasm/indexdb/group_model.go index 8a169c863..372d55a68 100644 --- a/wasm/indexdb/group_model.go +++ b/wasm/indexdb/group_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/init.go b/wasm/indexdb/init.go index b3ea48a49..2013906dc 100644 --- a/wasm/indexdb/init.go +++ b/wasm/indexdb/init.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/notification_model.go b/wasm/indexdb/notification_model.go index 20c933348..9e1dc2de6 100644 --- a/wasm/indexdb/notification_model.go +++ b/wasm/indexdb/notification_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/sending_messages_model.go b/wasm/indexdb/sending_messages_model.go index 9b1d97e9c..9f167c8ac 100644 --- a/wasm/indexdb/sending_messages_model.go +++ b/wasm/indexdb/sending_messages_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -19,6 +5,7 @@ package indexdb import ( "context" + "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" diff --git a/wasm/indexdb/temp_struct/struct.go b/wasm/indexdb/temp_struct/struct.go index d62012f3f..8e79fc45f 100644 --- a/wasm/indexdb/temp_struct/struct.go +++ b/wasm/indexdb/temp_struct/struct.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/indexdb/upload_model.go b/wasm/indexdb/upload_model.go index 992dbe102..ce07d7b9e 100644 --- a/wasm/indexdb/upload_model.go +++ b/wasm/indexdb/upload_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -19,6 +5,7 @@ package indexdb import ( "context" + "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" diff --git a/wasm/indexdb/user_model.go b/wasm/indexdb/user_model.go index 8850ea585..883ce917f 100644 --- a/wasm/indexdb/user_model.go +++ b/wasm/indexdb/user_model.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -19,14 +5,12 @@ package indexdb import ( "context" - "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" -) + "time" -import ( "github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" + "github.com/openimsdk/openim-sdk-core/v3/wasm/exec" "github.com/openimsdk/openim-sdk-core/v3/wasm/indexdb/temp_struct" - "time" ) type LocalUsers struct { diff --git a/wasm/wasm_wrapper/wasm_conversation_msg.go b/wasm/wasm_wrapper/wasm_conversation_msg.go index 7bd5fb530..858e50e9e 100644 --- a/wasm/wasm_wrapper/wasm_conversation_msg.go +++ b/wasm/wasm_wrapper/wasm_conversation_msg.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -143,28 +129,6 @@ func (w *WrapperConMsg) SendMessageNotOss(_ js.Value, args []js.Value) interface return event_listener.NewCaller(open_im_sdk.SendMessageNotOss, callback, &args).AsyncCallWithCallback() } -//func (w *WrapperConMsg) SetMessageReactionExtensions(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SetMessageReactionExtensions, callback, &args).AsyncCallWithCallback() -//} -//func (w *WrapperConMsg) AddMessageReactionExtensions(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.AddMessageReactionExtensions, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperConMsg) DeleteMessageReactionExtensions(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.DeleteMessageReactionExtensions, callback, &args).AsyncCallWithCallback() -//} -//func (w *WrapperConMsg) GetMessageListReactionExtensions(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.GetMessageListReactionExtensions, callback, &args).AsyncCallWithCallback() -//} -//func (w *WrapperConMsg) GetMessageListSomeReactionExtensions(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.GetMessageListSomeReactionExtensions, callback, &args).AsyncCallWithCallback() -//} - //------------------------------------conversation--------------------------- func (w *WrapperConMsg) GetAllConversationList(_ js.Value, args []js.Value) interface{} { diff --git a/wasm/wasm_wrapper/wasm_friend.go b/wasm/wasm_wrapper/wasm_friend.go index f13e08400..c78f49edf 100644 --- a/wasm/wasm_wrapper/wasm_friend.go +++ b/wasm/wasm_wrapper/wasm_friend.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/wasm_wrapper/wasm_group.go b/wasm/wasm_wrapper/wasm_group.go index 65fce1ec6..f1a9eceb6 100644 --- a/wasm/wasm_wrapper/wasm_group.go +++ b/wasm/wasm_wrapper/wasm_group.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/wasm_wrapper/wasm_init_login.go b/wasm/wasm_wrapper/wasm_init_login.go index 90e6b4a87..8550a5fac 100644 --- a/wasm/wasm_wrapper/wasm_init_login.go +++ b/wasm/wasm_wrapper/wasm_init_login.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm diff --git a/wasm/wasm_wrapper/wasm_signaling.go b/wasm/wasm_wrapper/wasm_signaling.go index 5462126e7..e4a1aea0f 100644 --- a/wasm/wasm_wrapper/wasm_signaling.go +++ b/wasm/wasm_wrapper/wasm_signaling.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm @@ -25,43 +11,3 @@ type WrapperSignaling struct { func NewWrapperSignaling(wrapperCommon *WrapperCommon) *WrapperSignaling { return &WrapperSignaling{WrapperCommon: wrapperCommon} } - -//func (w *WrapperSignaling) SignalingInviteInGroup(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingInviteInGroup, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingInvite(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingInvite, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingAccept(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingAccept, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingReject(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingReject, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingCancel(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingCancel, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingHungUp(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingHungUp, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingGetRoomByGroupID(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingGetRoomByGroupID, callback, &args).AsyncCallWithCallback() -//} -// -//func (w *WrapperSignaling) SignalingGetTokenByRoomID(_ js.Value, args []js.Value) interface{} { -// callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) -// return event_listener.NewCaller(open_im_sdk.SignalingGetTokenByRoomID, callback, &args).AsyncCallWithCallback() -//} diff --git a/wasm/wasm_wrapper/wasm_third.go b/wasm/wasm_wrapper/wasm_third.go index 99d84eeda..6940a91ad 100644 --- a/wasm/wasm_wrapper/wasm_third.go +++ b/wasm/wasm_wrapper/wasm_third.go @@ -1,28 +1,15 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm package wasm_wrapper import ( + "syscall/js" + "github.com/openimsdk/openim-sdk-core/v3/open_im_sdk" "github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback" "github.com/openimsdk/openim-sdk-core/v3/pkg/utils" "github.com/openimsdk/openim-sdk-core/v3/wasm/event_listener" - "syscall/js" ) // ------------------------------------third--------------------------- diff --git a/wasm/wasm_wrapper/wasm_user.go b/wasm/wasm_wrapper/wasm_user.go index 9f0c74e69..5c280d3d0 100644 --- a/wasm/wasm_wrapper/wasm_user.go +++ b/wasm/wasm_wrapper/wasm_user.go @@ -1,17 +1,3 @@ -// Copyright © 2023 OpenIM SDK. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - //go:build js && wasm // +build js,wasm