diff --git a/internal/conversation_msg/notification.go b/internal/conversation_msg/notification.go index 426de3cfd..a3f38b128 100644 --- a/internal/conversation_msg/notification.go +++ b/internal/conversation_msg/notification.go @@ -157,7 +157,7 @@ func (c *Conversation) doNotificationManager(c2v common.Cmd2Value) { func (c *Conversation) DoNotification(ctx context.Context, msg *sdkws.MsgData) { go func() { if err := c.doNotification(ctx, msg); err != nil { - log.ZWarn(ctx, "DoGroupNotification failed", err) + log.ZWarn(ctx, "DoConversationNotification failed", err) } }() } diff --git a/wasm/cmd/main.go b/wasm/cmd/main.go index 9b7f242dc..13898f9db 100644 --- a/wasm/cmd/main.go +++ b/wasm/cmd/main.go @@ -116,6 +116,7 @@ func registerFunc() { js.Global().Set("insertGroupMessageToLocalStorage", js.FuncOf(wrapperConMsg.InsertGroupMessageToLocalStorage)) js.Global().Set("searchLocalMessages", js.FuncOf(wrapperConMsg.SearchLocalMessages)) js.Global().Set("setMessageLocalEx", js.FuncOf(wrapperConMsg.SetMessageLocalEx)) + js.Global().Set("searchConversation", js.FuncOf(wrapperConMsg.SearchConversation)) js.Global().Set("changeInputStates", js.FuncOf(wrapperConMsg.ChangeInputStates)) js.Global().Set("getInputStates", js.FuncOf(wrapperConMsg.GetInputStates)) diff --git a/wasm/wasm_wrapper/wasm_conversation_msg.go b/wasm/wasm_wrapper/wasm_conversation_msg.go index c0d467a6e..49256fbf4 100644 --- a/wasm/wasm_wrapper/wasm_conversation_msg.go +++ b/wasm/wasm_wrapper/wasm_conversation_msg.go @@ -258,6 +258,11 @@ func (w *WrapperConMsg) SetMessageLocalEx(_ js.Value, args []js.Value) interface return event_listener.NewCaller(open_im_sdk.SetMessageLocalEx, callback, &args).AsyncCallWithCallback() } +func (w *WrapperConMsg) SearchConversation(_ js.Value, args []js.Value) interface{} { + callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) + return event_listener.NewCaller(open_im_sdk.SearchConversation, callback, &args).AsyncCallWithCallback() +} + func (w *WrapperConMsg) DeleteConversationAndDeleteAllMsg(_ js.Value, args []js.Value) interface{} { callback := event_listener.NewBaseCallback(utils.FirstLower(utils.GetSelfFuncName()), w.commonFunc) return event_listener.NewCaller(open_im_sdk.DeleteConversationAndDeleteAllMsg, callback, &args).AsyncCallWithCallback()