From 65d09726f51b44ed638eb719a1f0b272c0568723 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong (cubxxw)" <3293172751nss@gmail.com> Date: Mon, 26 Feb 2024 17:25:09 +0800 Subject: [PATCH] feat: fix openim tools error code --- cmd/openim-api/main.go | 6 +++--- internal/msgtransfer/online_history_msg_handler.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index 675fbf3a6..eeaa04d07 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -67,15 +67,15 @@ func run(port int, proPort int) error { // Determine whether zk is passed according to whether it is a clustered deployment client, err = kdisc.NewDiscoveryRegister(config.Config.Envs.Discovery) if err != nil { - return errs.Wrap(err, "register discovery err") + return err } if err = client.CreateRpcRootNodes(config.Config.GetServiceNames()); err != nil { - return errs.Wrap(err, "create rpc root nodes error") + return err } if err = client.RegisterConf2Registry(constant.OpenIMCommonConfigKey, config.Config.EncodeConfig()); err != nil { - return errs.Wrap(err, "register config to registry error") + return err } var ( diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index 393ec7a75..be7c36718 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -169,7 +169,7 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) { } } -// 获取消息/通知 存储的消息列表, 不存储并且推送的消息列表,. +// Get messages/notifications stored message list, not stored and pushed message list. func (och *OnlineHistoryRedisConsumerHandler) getPushStorageMsgList( totalMsgs []*ContextMsg, ) (storageMsgList, notStorageMsgList, storageNotificatoinList, notStorageNotificationList, modifyMsgList []*sdkws.MsgData) { @@ -190,7 +190,7 @@ func (och *OnlineHistoryRedisConsumerHandler) getPushStorageMsgList( // clone msg from notificationMsg if options.IsSendMsg() { msg := proto.Clone(v.message).(*sdkws.MsgData) - // 消息 + // message if v.message.Options != nil { msg.Options = msgprocessor.NewMsgOptions() }